Find the answer to your Linux question:
Results 1 to 2 of 2
>, |, >> what do the symbols do?...
  1. #1
    Just Joined!
    Join Date
    Apr 2010
    Posts
    4

    Linux symbols!?? What do they do?

    >, |, >> what do the symbols do?

  2. #2
    Linux Guru techieMoe's Avatar
    Join Date
    Aug 2004
    Location
    Texas
    Posts
    9,496
    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.

    Code:
    ls | less
    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 > fileList.txt
    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):

    UNIX / Linux Tutorial for Beginners
    LinuxCommand.org: Learn the Linux command line. Write shell scripts.
    Registered Linux user #270181
    TechieMoe's Tech Rants

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...