Pipes

One of the most powerful properties of Unix is that you can pipe the standard output of one command into the standard input of another.

The pipe symbol | is above the backslash on most US keyboards. Pipes can be chained indefinitely, though most uses need just one.

cmd1 | cmd2 | cmd3

Example

Commands such as ls have lengthy manpages that will tend to scroll off our terminal window.

$man ls | more

Now we can page through the listing.

Previous
Next