About this user

Jesse Blomberg http://imitationmonkey.com/

« Newer Snippets
Older Snippets »
1 total  XML / RSS feed 

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.
« Newer Snippets
Older Snippets »
1 total  XML / RSS feed