linux_wiki:use_input-output_redirection

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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+'>Redirect standard output to a file, overwrite contents
 <code bash> <code bash>
 cat /etc/system-release > info.txt cat /etc/system-release > info.txt
Line 13: Line 13:
  
 \\ \\
->> Redirect standard output to file, append to file+'>>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+'|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>Redirect standard error
 <code bash> <code bash>
 ssh admin@webserver01.com "uptime" 2>/dev/null ssh admin@webserver01.com "uptime" 2>/dev/null
  • linux_wiki/use_input-output_redirection.1456803558.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)