MKNOD(8) | MidnightBSD System Manager's Manual | MKNOD(8) |
mknod
— build
special file
mknod |
name |
mknod |
name [b |
c ] major minor
[owner:group] |
mknod
utility is deprecated on
modern FreeBSD systems.The mknod
utility creates device special
files. To make nodes manually, the arguments are:
b
|
c
b
. All other devices are character type devices,
such as terminal and pseudo devices, and are type
c
.Major and minor device numbers can be given in any format
acceptable to
strtoul(3), so that a
leading ‘0x
’ indicates a hexadecimal
number, and a leading ‘0
’ will cause
the number to be interpreted as octal.
The mknod
utility can be used to recreate
deleted device nodes under a
devfs(5) mount point by
invoking it with only a filename as an argument. Example:
mknod /dev/cd0
where /dev/cd0 is the name of the deleted device node.
The chown(8)-like functionality is specific to FreeBSD.
As of FreeBSD 4.0, block devices were
deprecated in favour of character devices. As of FreeBSD
5.0, device nodes are managed by the device file system
devfs(5), making the
mknod
utility superfluous. As of
FreeBSD 6.0 device nodes may be created in regular
file systems but such nodes cannot be used to access devices.
A mknod
utility appeared in
Version 4 AT&T UNIX.
October 3, 2016 | midnightbsd-3.1 |