2011年3月11日 星期五

Redirect stderr to file

IO index is:
1 is stdout
2 is stderr

===Redirect stderr to 'log.txt' file===

$ someprogram  2> log.txt

===Redirect stderr to stdout===

$ someprogram 2>&1 | less

===Redirect stderr and stdout to a file===

$ someprogram &> log.txt

沒有留言: