Danny's tech notebook | 丹尼技術手札
A personal technical notebook 一本個人的技術手札 (天道酬勤)
Showing posts with label
tee
.
Show all posts
Showing posts with label
tee
.
Show all posts
Tuesday, August 20, 2013
[Linux Command] Redirect stderr to stdout and output to terminal and log into file at the same time
If you want to redirect stderr to stdout, append this at your command: 2>&1 , and also for outputting to terminal and logging into file you should use tee.
Both together would look like this:
$ yourcommand 2>&1 | tee yourlogfile.log
Older Posts
Home
Subscribe to:
Posts (Atom)