2020-03-01 23:58:37 +00:00
|
|
|
.Dd 2015-02-02
|
|
|
|
.Dt MKNOD 1
|
|
|
|
.Os sbase
|
|
|
|
.Sh NAME
|
|
|
|
.Nm mknod
|
|
|
|
.Nd create a special device file
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
|
|
|
.Op Fl m Ar mode
|
|
|
|
.Ar name
|
2020-03-02 00:30:56 +00:00
|
|
|
.Cm b Ns | Ns Cm c Ns | Ns Cm u
|
2020-03-01 23:58:37 +00:00
|
|
|
.Ar major
|
|
|
|
.Ar minor
|
|
|
|
.Nm
|
2020-03-02 00:30:56 +00:00
|
|
|
.Op Fl m Ar mode
|
2020-03-01 23:58:37 +00:00
|
|
|
.Ar name
|
2020-03-02 00:30:56 +00:00
|
|
|
.Cm p
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
|
|
|
creates a special file named
|
|
|
|
.Ar name .
|
|
|
|
.Pp
|
|
|
|
The following special file types are supported:
|
2020-03-01 23:58:37 +00:00
|
|
|
.Bl -tag -width Ds
|
2020-03-02 00:30:56 +00:00
|
|
|
.It Cm b
|
2020-03-01 23:58:37 +00:00
|
|
|
A block device.
|
2020-03-02 00:30:56 +00:00
|
|
|
.It Cm c | u
|
|
|
|
A character device.
|
|
|
|
.It Cm p
|
|
|
|
A named pipe.
|
2020-03-01 23:58:37 +00:00
|
|
|
.El
|
2020-03-02 00:30:56 +00:00
|
|
|
.Pp
|
|
|
|
Block and character devices are created with major number
|
|
|
|
.Ar major ,
|
|
|
|
and minor number
|
|
|
|
.Ar minor .
|
2020-03-01 23:58:37 +00:00
|
|
|
.Sh OPTIONS
|
|
|
|
.Bl -tag -width Ds
|
|
|
|
.It Fl m
|
|
|
|
Set the mode of the new file based on the octal value of
|
|
|
|
.Ar mode .
|
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr mknod 2
|