I/O Redirection
> |
Redirect STDOUT to a file |
2> |
Redirect STERR to a file |
&> |
Redirect all output to a file |
2>&1 |
Redirect all output to a pipe |
cmd1 | cmd2 |
Pipe STDOUT of cmd1 to cmd2 |
Use >> to append rather than overwrite
Comments
> |
Redirect STDOUT to a file |
2> |
Redirect STERR to a file |
&> |
Redirect all output to a file |
2>&1 |
Redirect all output to a pipe |
cmd1 | cmd2 |
Pipe STDOUT of cmd1 to cmd2 |