$linuxjunkies
>

pipe

also: unnamed pipe, |, FIFO

A pipe is a mechanism that connects the standard output of one command directly to the standard input of another, allowing data to flow between processes. It is represented by the | character.

A pipe enables inter-process communication by redirecting the output stream of one program to serve as the input stream for another. This allows you to chain commands together, where each command processes the data and passes the result downstream.

The most common form is the unnamed pipe (created with |), which is temporary and exists only for the duration of the command line. For example:

cat /var/log/syslog | grep error | wc -l
This command reads the syslog file, filters lines containing "error", and counts them—each stage processes the output of the previous one.

Pipes are fundamental to Unix philosophy and enable composition of small, single-purpose tools into powerful workflows. You can also create named pipes (FIFOs) for more persistent inter-process communication between unrelated processes.

Related terms