Skip to main content

Redirects

Redirection allows input and output of commands to be sent to files instead of the screen. It is used to save results or read data from a file.

SymbolDescriptionExample
>Redirect output to a file (overwrite)ls > list.txt
>>Append output to a fileecho "data" >> notes.txt
<Read input from a filesort < names.txt
2>Redirect errors to a filels /root 2> error.log