Page History
...
Code Block |
---|
command > file.txt
command >> file.txt # to append
command >& file.txt # re-direct stdout and stderr
command 1>& file.txt # 1-stdout
command 2>& file.txt # 2-stderr
command &>> file.txt # append file with both streams (2-stderr to 1-stdout)
command 2> /dev/null # silence error
command 2>&1 # re-direct 2-stderr to 1-stdout
command 2>&1 >> file.txt # re-direct 2-stderr to 1-stdout and append file with both streams |
...
Overview
Content Tools