Monday, October 15, 2007

Linux I/O Redirection

The following code redirects stdout to 'outfile.txt', and then it assigns stderr to stdout, which will in effect point stderr to 'outfile.txt' as well.
[root@server /root]# cmd 1>outfile.txt 2>&1
0 = stdin
1 = stdout
2 = stderr

Linux I/O Redirection

No comments: