Show Menu

IO Redirection by DaveChild

About This Content

This content, IO Redirection, was created on 28th October, 2011 and was last updated on 21st February, 2014.

Tags

bash, commandline, linux

IO Redirection appears on:

IO Redirection

cmd < file
Input of cmd from file
cmd1 <(­cmd2)
Output of cmd2 as file input to cmd1
cmd > file
Standard output (stdout) of cmd to file
cmd > /dev/null
Discard stdout of cmd
cmd >> file
Append stdout to file
cmd 2> file
Error output (stderr) of cmd to file
cmd 1>&2
stdout to same place as stderr
cmd 2>&1
stderr to same place as stdout
cmd &> file
Every output of cmd to file

cmd refers to a command.