A first-in, first-out (FIFO) file is a pipe that has a name in the filesystem.
Any process can open or close the FIFO; the processes on either end of the pipe need not be related to each other.
FIFOs are also called named pipes.
$ mkfifo /tmp/fifo
$ ls -l /tmp/fifo
In one window, read from the FIFO by invoking the following:
$ cat < /tmp/fifo
In a second window, write to the FIFO by invoking this:
$ cat > /tmp/fifo
Then type in some lines of text. Each time you press Enter, the line of text is sent through the FIFO and appears in the first window. Close the FIFO by pressing Ctrl+D in the second window.