N Nam Phong New member Jan 6, 2022 #1 How do I redirect stderr to a file? Answer To redirect stderr as well, you have a few choices: Redirect stdout to one file and stderr to another file: command > out 2>error. Redirect stdout to a file ( >out ), and then redirect stderr to stdout ( 2>&1 ): command >out 2>&1.
How do I redirect stderr to a file? Answer To redirect stderr as well, you have a few choices: Redirect stdout to one file and stderr to another file: command > out 2>error. Redirect stdout to a file ( >out ), and then redirect stderr to stdout ( 2>&1 ): command >out 2>&1.