- Redirect stdout to one file and stderr to another file:
12command > out 2>error - Redirect stderr to stdout (
&1
), and then redirect stdout to a file:
12command >out 2>&1 - Redirect both to a file:
1command &> out
https://askubuntu.com/questions/625224/how-to-redirect-stderr-to-a-file