Does named pipe modify the filesystem

fifofilesystemspipe

If I create a named pipe and then read/write on it, is the filesystem where the named pipe resides affected? I.e. is the data buffered on the filesystem until read, or does it reside in memory only?

Best Answer

The file object itself is created in the filesystem, but no data is stored in a file system. From the mkpipe(3) manpage:

   A  FIFO special file is similar to a pipe, except that it is created in
   a different way.  Instead of being an anonymous communications channel,
   a  FIFO  special  file  is  entered  into  the  file  system by calling
   mkfifo().

About the only time the data might be stored on disk is during hibernation when memory is written to the swap space, including buffers - however this an corner case.

Related Question