How do you redirect the standard error of a command to a file?
Answer
To redirect stderr as well, you have a few choices:
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.