# # mknod - Make special files.
APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

2003/11/20 mknod

I've removed advertising from most of this site and will eventually clean up the few pages where it remains.

While not terribly expensive to maintain, this does cost me something. If I don't get enough donations to cover that expense, I will be shutting the site down in early 2020.

If you found something useful today, please consider a small donation.



Some material is very old and may be incorrect today

© November 2003 Tony Lawrence

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.


If you found something useful today, please consider a small donation.



Got something to add? Send me email.





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

Printer Friendly Version

->
-> mknod - Make special files.


Inexpensive and informative Apple related e-books:

Take Control of iCloud

Photos for Mac: A Take Control Crash Course

Take Control of IOS 11

Take Control of OS X Server

Take Control of Numbers





More Articles by © 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



Printer Friendly Version

Have you tried Searching this site?

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


Printer Friendly Version





A learning experience is one of those things that say, "You know that thing you just did? Don't do that." (Douglas Adams)




Linux posts

Troubleshooting posts


This post tagged:

Shell

UnixWords



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode