mirror of
https://github.com/sahinakkaya/til.git
synced 2024-11-24 09:39:37 +01:00
TIL: Redirecting the output of a command to a file
This commit is contained in:
parent
6de0fb8da6
commit
fbdb3dcbe0
@ -0,0 +1,8 @@
|
|||||||
|
1. Redirect stdout to one file and stderr to another file:
|
||||||
|
|
||||||
|
command > out 2>error
|
||||||
|
|
||||||
|
2. Redirect stdout to a file `out`, and then redirect stderr to stdout:
|
||||||
|
|
||||||
|
command > out 2>&1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user