Standard input, Standard Output, Standard Error
3+ filename
Other files
2> file
redirect stderr to overwrite a file
>> file2>&1 and/or &>> file
redirect stdout and stderr to append to the same file
> file2>&1 and/or &> file
redirect stdout and stderr to overwrite the same file
>> file
redirect stdout to append to a file
> file
Redirect stdout to overwrite a file
0 stdin
Standard Input (Keyboard)
2 stderr
Standard error (Terminal)
1 stdout
Standard output (Terminal)
|
called a pipe, this connects the standard output of the first command to the input of the second command
tee
copies standard input to its standard output and also redirects its standard output to the files named as arguments to the command
2> dev/null
discard stderr error messages by redirecting to dev/null