? Earlier 1 items total Later ?

On this page:?

Redirect all output to a single file

Shell commands often output to both standard output and standard error. If you want to send *all* of this to a log file, use the following.

your_shell_script >> /path/to/logfile 2>&1


The 2>&1 bit is the part that redirects standard error to standard out, allowing you to capture both.

? Earlier 1 items total Later ?