> (» ) | send standard output to file (in append mode) |
---|---|
>& (»& ) | send both standard output and error to file (in append mode) |
| | send standard output |
|& | send both standard output and error (shorthand for 2>&1 | ) |
2>&1 | redirect standard error to standard output |
| tee output.log | send the standard output to both the file and the screen |
2>&1 | tee output.log | send both standard output and standard error to both the file and the screen |