Created
August 16, 2022 04:48
-
-
Save flashvnn/4ef2ad7faaaf30afeeabfd4515ac89fa to your computer and use it in GitHub Desktop.
Command redirect output to log file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|| visible in terminal || visible in file || existing | |
Syntax || StdOut | StdErr || StdOut | StdErr || file | |
==========++==========+==========++==========+==========++=========== | |
> || no | yes || yes | no || overwrite | |
>> || no | yes || yes | no || append | |
|| | || | || | |
2> || yes | no || no | yes || overwrite | |
2>> || yes | no || no | yes || append | |
|| | || | || | |
&> || no | no || yes | yes || overwrite | |
&>> || no | no || yes | yes || append | |
|| | || | || | |
| tee || yes | yes || yes | no || overwrite | |
| tee -a || yes | yes || yes | no || append | |
|| | || | || | |
n.e. (*) || yes | yes || no | yes || overwrite | |
n.e. (*) || yes | yes || no | yes || append | |
|| | || | || | |
|& tee || yes | yes || yes | yes || overwrite | |
|& tee -a || yes | yes || yes | yes || append |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment