Results 1 to 2 of 2
>, |, >> what do the symbols do?...
- 05-25-2010 #1Just Joined!
- Join Date
- Apr 2010
- Posts
- 4
Linux symbols!?? What do they do?
>, |, >> what do the symbols do?
- 05-25-2010 #2
The pipe "|" is useful in command-line operations, particularly when you want to string a number of commands together. It instructs the operating system to redirect the output of the first command into the second. Say, for instance, you wanted to view a directory's contents but didn't want to have everything scroll by so fast you couldn't read it. You can pipe the output of ls into a screen paginator like less and get single screen scrolling.
I don't use ">" and ">>" very often in everyday life, but I do know you can use ">" to redirect output as well. For instance, say you wanted to dump the list of files in a directory to a text file:Code:ls | less
The ">>" command appends the contents of files together. For more examples and better explanations than I can give regarding the Linux command line, see these links (and any links people post after me):Code:ls > fileList.txt
UNIX / Linux Tutorial for Beginners
LinuxCommand.org: Learn the Linux command line. Write shell scripts.Registered Linux user #270181
TechieMoe's Tech Rants


Reply With Quote