.po 1i .TH MKNOD 1 Bell .V 08/15/84 16:58:48 .\" @[$]mknod.1 1.7 08/15/84 16:58:48 - Zilog Inc. .ad .fi .SH NAME mknod \- build special file .SH SYNOPSIS .B /etc/mknod .I name [ .B c ] [ .B b ] .I major .I minor .br .B /etc/mknod .I name .B p .SH DESCRIPTION .B Mknod\^ makes a directory entry and corresponding i-node for a special file. .PP .B Mknod\^ can also be used to create fifo's (a.k.a named pipes) (second case in .SM .B SYNOPSIS above). This use of .B mknod\^ can be used by any user. The first case can be used only by members of the 'system' group. It is used to create special device files. .PP The first argument is the .I name\^ of the entry. In the first case, the second is .B b if the special file is block-type (disks, tape) or .B c if it is character-type (other devices). The last two arguments are numbers specifying the .I major\^ device type and the .I minor\^ device (e.g. unit, drive, or line number), which may be either decimal or octal. A leading 0 for the major and minor device numbers mean that they are in octal. .PP The assignment of major device numbers depends on the position of the driver in dispatch tables in the kernel. The major device numbers for current drivers is as follows: .sp 2 .ta 2i 4.5i Device Character Dev. Block Dev. .br Major Number Major Number .ta 2.5i 5i .sp .nf ZD 0 0 CT 1 1 SMD 2 8 MT 3 9 MD 4 10 ERR 5 -- MEM 6 -- TTY 7 -- SIO 8 -- LP 9, 10 -- PTC (unet) 11 -- PTS (unet) 12 -- UP (unet) 13 -- UU (unet) 14 -- UD (unet) 15 -- .bp \ \ .sp .ta 2i 4.5i Device (cont.) Character Dev. Block Dev. Major Number Major Number .sp .ta 2.5i 5i U1 (user defined dev) 16 2 U2 (user defined dev) 17 3 U3 (user defined dev) 18 4 U4 (user defined dev) 19 5 U5 (user defined dev) 20 6 U6 (user defined dev) 21 7 .fi .ta .PP The minor device number is device dependent. For disks, the minor device number is the number of the file system. The first digit (decimal) corresponds to the drive number and the second digit (decimal) is the order of the file system on the disk. For ttys, the minor device number is the number of the port. For other devices the numbers represent options passed to the drivers (eg. no-rewind for tapes). .SH SEE ALSO mknod(M), mknod(2).