Creating Pipelines of Data

Learn how to create pipelines of data by chaining together various tools.

Pipeline of programs

One of the main foundations of a Unix-based system is that programs work together as a pipeline. The output of one program can be the input of another. In other words, we send the standard output of one program to the standard input of another.

The less command makes it easy to navigate through a large file by reading it one page at a time, but less also accepts input from standard input. If we have a very long directory listing, we can send the output from the ls -alh command to the less command to paginate the results:

$ ls -alh /usr/bin | less

Use the terminal below to practice these commands.

Get hands-on with 1400+ tech skills courses.