MKNOD(1M)
NAME
mknod − create special and FIFO files
SYNOPSIS
/etc/mknod name c | b major minor [cnode_name]
/etc/mknod name p
/etc/mknod name n nodename
DESCRIPTION
Mknod makes a directory entry and corresponding inode for following special files:
• Device special file (first SYNOPSIS line form),
• FIFO file, sometimes called a named pipe (second SYNOPSIS line form),
• Network special file (third form). See NETWORKING FEATURES below.
Name is the path name of the special file to be created.
Device Special Files
For device special files, the second argument should be:
b for block-type special files (such as disks), or
c for character-type special files (other devices such as 9-track tapes or line printers).
Other arguments:
major number specifying major device type (e.g., device driver number)
minor number specifying the device location (typically, but not exclusively, the unit, drive, HP-IB bus address and/or line number).
cnode_name, if present, specifies the cnode name or cnode ID (see glossary(9)). A call to mkrnod() is made (see mknod(2)), with cnode ID determined as follows:
• If cnode_name is a numeric value, it is accepted as the cnode ID.
• If cnode_name is non-numeric, it is interpreted as the cnode name, and file /etc/clusterconf is searched to determine the cnode ID.
Assignment of major and minor device numbers is specific to each HP-UX system. Major and minor can each be specified in hexadecimal, octal, or decimal, using C language conventions (decimal numbers: no leading zero, octal numbers: leading zero, hexadecimal: leading zero followed by ’x’.) Requires real user ID of 0 (super-user).
Named Pipes
To create named pipes or FIFO buffer files, use p as the second argument to mknod. [The mkfifo(1) command can also be used for this purpose.] All users can use mknod to create named pipes.
Permissions
The newly created file has a mode of 0666, as modified by the current setting of the user’s umask.
Access Control Lists (ACLs)
Optional ACL entries can be added to special files and FIFOs with chacl(1). However, system programs are likely to silently change or eliminate the optional ACL entries for these files.
NETWORKING FEATURES
RFA
Mknod is also used to create a network special file. A network special file addresses another node identified by nodename on a local area network. Requires real user ID of 0 (super-user).
SEE ALSO
chacl(1), mkfifo(1) lsdev(1M), mknod(2), mknod(4), acl(5).
HP-UX System Administrator Manual
STANDARDS CONFORMANCE
mknod: SVID2, XPG2
Hewlett-Packard Company — HP-UX Release 7.0: Sept 1989