| | | | | linguist.page@gmail.com

Pipe output of one command into another

Type here
command1 | command2

Redirect output to a file overwriting it

Type here
command > output.txt

Redirect output appending to a file

Type here
command >> output.txt

Redirect errors to a file

Type here
command 2> errors.txt

Redirect both output and errors to a file

Type here
command > output.txt 2>&1

Execute multiple commands sequentially

Type here
command1 ; command2

Execute second command only if first succeeds

Type here
command1 && command2

Execute second command only if first fails

Type here
command1 || command2