bash:redirection
This is an old revision of the document!
BASH - Redirection
Output Redirection
The '>' symbol is used for output (STDOUT) redirection.
ls -al > listings
Here the output of command ls -al is re-directed to file “listings” instead of your screen.
NOTE: Use the correct file name while redirecting command output to a file.
If there is an existing file with the same name, the redirected command will delete the contents of that file and then it may be overwritten.
If you do not want a file to be overwritten but want to add more content to an existing file, then you should use '»' operator.
bash/redirection.1576351647.txt.gz · Last modified: 2020/07/15 09:30 (external edit)