The Open Source Swiss Army Knife

/unix/commandline/
/unix/commandline/ + sub-categories
http://www.sirfsup.com/
web directory content
    
      

Not logged in
Chat Register Login
return to:  http:/www.sirfsup.com      /unix   /commandline 
Permalink: mknod.htm
Title: add
article options : please login   |  print view

  1. one
  2. two
  3. man page

one

(from /usr/share/doc/ppp-***/....)

mknod /dev/ppp c 108 0
chmod 600 /dev/ppp

two

:
# script to create a device file for Synchronics to use with a spooled printer
# start this from /etc/rc2.d/S99local
rm -f /dev/forms
mknod /dev/forms p
chmod 666 /dev/forms
while true
do
cat /dev/forms | lpr -P forms
done
source: http://www.aplawrence.com/Linux/cp.html

manp

      b      create a block (buffered) special file

       c, u   create a character (unbuffered) special file

       p      create a FIFO

[root@www dev]# mknod --help
Usage: mknod [OPTION]... NAME TYPE [MAJOR MINOR]
Create the special file NAME of the given TYPE.

Mandatory arguments to long options are mandatory for short options too.
  -m, --mode=MODE   set permission mode (as in chmod), not a=rw - umask
      --help     display this help and exit
      --version  output version information and exit

MAJOR MINOR are forbidden for TYPE p, mandatory otherwise.  TYPE may be:

  b      create a block (buffered) special file
  c, u   create a character (unbuffered) special file
  p      create a FIFO

Report bugs to .
  1. [root@www dev]# mknod scd0 b 11 0

Leave a Reply
Your Name:     anonymous
Your Email:
Website:  
Comments:

The author will be notified of your reply.
return to top