Random Wisdom

Named Pipes (FIFOs)

by on May.22, 2007, under How To ..., Linux

A named pipe is a special kind of file on *nix systems that can be used for inter-process communication. They behave like FIFOs and are created using the command “mkfifo“:


$ mkfifo mypipe
$ ls -l mypipe
prw-rw-r-- 1 xxx xxx 0 May 22 10:18 mypipe

The “p” in the attributes list indicates that this is indeed a pipe.

A trivial example of its use may be to redirect the output of a command on a remote server to a pipe and then reading from that pipe from another host via ssh.

:,

Leave a Reply