|
|
||
|
||
|
|
| Red Hat Documentation: man pages: man1: User Commands (1) |
MKNODSection: User Commands (1)Updated: August 1998 Index NAMEmknod - make block or character special filesSYNOPSISmknod [options] name {bc} major minormknod [options] name p GNU options (shortest form): [-m mode] [--help] [--version] [--] DESCRIPTIONmknod creates a FIFO (named pipe), character special file, or block special file with the specified name.A special file is a triple (boolean, integer, integer) stored in the filesystem. The boolean chooses between character special file and block special file. The two integers are the major and minor device number. Thus, a special file takes almost no place on disk, and is used only for communication with the operating system, not for data storage. Often special files refer to hardware devices (disk, tape, tty, printer) or to operating system services (/dev/null, /dev/random). Block special files usually are disk-like devices (where data can be accessed given a block number, and e.g. it is meaningful to have a block cache). All other devices are character special files. (Long ago the distinction was a different one: I/O to a character special file would be unbuffered, to a block special file buffered.) The mknod command is what creates files of this type. The argument following name specifies the type of file to make:
The GNU version of mknod allows u (`unbuffered') as a synonym for c. When making a block or character special file, the major and minor device numbers must be given after the file type (in decimal, or in octal with leading 0; the GNU version also allows hexadecimal with leading 0x). By default, the mode of created files is 0666 (`a+rw') minus the bits set in the umask. OPTIONS
GNU STANDARD OPTIONS
CONFORMING TOPOSIX does not describe this command as it is nonportable, and recommends using to make FIFOs. SVID has a command /etc/mknod with the above syntax, but without the mode option.NOTESOn a Linux system (version 1.3.22 or newer) the file /usr/src/linux/Documentation/devices.tex contains a list of devices with device name, type, major and minor number.The present page describes mknod as found in the fileutils-3.16 package; other versions may differ slightly. Mail corrections and additions to aeb@cwi.nl and aw@mail1.bet1.puv.fi and ragnar@lightside.ddns.org . Report bugs in the program to fileutils-bugs@gnu.ai.mit.edu. SEE ALSO
IndexThis document was created by using the manual pages. Time: 11:46:34 GMT, March 24, 2025 |
|
|