Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux_wiki:use_input-output_redirection [2016/02/29 22:39] billdozor |
linux_wiki:use_input-output_redirection [2019/05/25 23:50] (current) |
||
---|---|---|---|
Line 7: | Line 7: | ||
---- | ---- | ||
- | > Redirect standard output to a file, overwrite contents | + | '>' |
<code bash> | <code bash> | ||
cat / | cat / | ||
Line 13: | Line 13: | ||
\\ | \\ | ||
- | >> Redirect standard output to file, append to file | + | '>>' |
<code bash> | <code bash> | ||
tail /etc/passwd >> info.txt | tail /etc/passwd >> info.txt | ||
Line 19: | Line 19: | ||
\\ | \\ | ||
- | | Piping output to other commands | + | '|' |
<code bash> | <code bash> | ||
cat /etc/passwd | wc -l | cat /etc/passwd | wc -l | ||
Line 26: | Line 26: | ||
\\ | \\ | ||
- | 2> Redirect standard error | + | '2>' |
<code bash> | <code bash> | ||
ssh admin@webserver01.com " | ssh admin@webserver01.com " |