手册页部分 1M: 系统管理命令

退出打印视图

更新时间: 2014 年 7 月
 
 

mknod(1M)

名称

mknod - make a special file

用法概要

mknod name b major minor
mknod name c major minor
mknod name p

描述

mknod makes a directory entry for a special file.

选项

The following options are supported:

b

Create a block-type special file.

c

Create a character-type special file.

p

Create a FIFO (named pipe).

操作数

The following operands are supported:

major

The major device number.

minor

The minor device number; can be either decimal or octal. The assignment of major device numbers is specific to each system. You must be the super-user to use this form of the command.

name

A special file to be created.

用法

See largefile(5) for the description of the behavior of mknod when encountering files greater than or equal to 2 Gbyte ( 231 bytes).

属性

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/core-os

另请参见

ftp(1), mknod(2), symlink(2), attributes(5), largefile( 5)

附注

If mknod(2) is used to create a device, the major and minor device numbers are always interpreted by the kernel running on that machine.

With the advent of physical device naming, it would be preferable to create a symbolic link to the physical name of the device (in the /devices subtree) rather than using mknod.