mknod - build block special or character special file

Overview

mknod [options] name {bc} major minor
mknod [options] name p

GNU options (abbreviated):

[-m mode] [--help] [--version] [--]

description

generating a specified name mknod FIFO (named pipe), a dedicated character or block special file.

File system a dedicated file storage with three types of information (Brown, int, int). Brownian choice between characters in the document file and the block, two integer is the primary, the secondary device number.

Typically, a dedicated file does not take up space on the disk, the exchange offer is only for the operating system, not for data storage service. In general, the special file points to a hardware device (such as: disk, tape, printer, virtual console) or services provided by the operating system (such as: / dev / null, / dev / random).

Block files are usually similar to the disk device (given a block number where the data can be accessed, meaning that while setting a block cache). All other devices are character files. (Previously, between the two there is a difference of file types such as: character file I / O is not cached, and block file there.)

mknod command is used to produce this type of file.

The following parameter specifies the type of generated file:

p
FIFO type
b
Block file
c
Character file

GNU version also allows the use of u ( 'unbufferd' non-buffered), to remain consistent with the C language.

When creating a file or a block of character files, major and minor device number must be given after the file type parameter. (Decimal or octal start with 0; GNU version also allows beginning 0x in hexadecimal) by default, the generated file mode is 0666 ( 'a + rw').

Options

-m fashion , --mode = fashion
For the newly created document setting mode, as the same chmod command application, create a new directory later still use the default mode.

 

GNU Standard Options

--help
On standard output display usage information and exit successfully.
--version
Display version information and exit successfully on standard output
--
Terminal list of options. 

Guess you like

Origin www.cnblogs.com/fanweisheng/p/11089449.html