APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

2003/11/20 mknod

Make special files. Obviously this (the underlying system call, actually) gets used a lot in /dev, but there are other uses. I often use this to make a device file for printing to (see How can I make a device that will print to a network printer?), and the same general idea is useful for other schemes. I've used it to let a non-privileged user send commands to a root process - the user writes to the named pipe, and a root process reads it and acts appropriately (you wouldn't want to literally execute whatever the user writes - you would do this for a specific purpose, such as copying data written to a file in a protected directory, etc.).

On some systems there is a specific "mkfifo" command; mknod is more general purpose.



Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> -> mknod - Make special files.



Increase ad revenue 50-250% with Ezoic


More Articles by

Find me on Google+

© Tony Lawrence




mkfifo exists in SCO OSR5 and may be used to create a named pipe (FIFO). It has the syntax:

mkfifo [-m] pathname

The -m option may be used to set the permissions on the newly-created fifo. For example:

mkfifo -m 666 /dev/mypipe

--BigDumbDinosaur

Kerio Samepage


Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us





Today’s computers are not even close to a 4-year-old human in their ability to see, talk, move, or use common sense. One reason, of course, is sheer computing power. It has been estimated that the information processing capacity of even the most powerful supercomputer is equal to the nervous system of a snail—a tiny fraction of the power available to the supercomputer inside [our] skull. (Steven Pinker)





This post tagged: