NAME
mkfifo, mknod
— create named pipe or special
file
SYNOPSIS
mkfifo |
[-m mode]
[-Z|--context[=MAC]]
fifo… |
mknod |
[-m mode]
[-Z|--context[=MAC]]
device
c|b
major minor |
mknod |
[-m mode]
[-Z|--context[=MAC]]
fifo p |
DESCRIPTION
Creates the specified named pipes (FIFOs), or
major:minor
device nodes — character with c, block with
b.
OPTIONS
-m,--mode=mode- chmod(1)-style file permissions to create
fifos (device) as, rather than
the default
a=rw- umask. Special bits are refused. -Z,--context- Create fifos (device) with the default SELinux contexts for their paths. Ignored without SELinux.
--context=MAC- Create fifos (device) with SELinux context set to MAC. Ignored (diagnostic issued) without SELinux.
EXIT STATUS
1 if a file couldn't be created,
SEE ALSO
STANDARDS
Conforms to IEEE Std 1003.1-2024
(“POSIX.1”). --context and refusing
special mode bits instead of ignoring them are
extensions, originating from the GNU system. The BSD
honours the special bits as an extension.
mknod
c|b is compatible with
Version 4 AT&T UNIX;
mknod p with
AT&T System V UNIX.
u is accepted as an alias for
c for compatibility with the GNU system; avoid
it.
HISTORY
mknod appeared, fully formed, in
Version 4 AT&T UNIX as
mknod(VIII):
It gained the p usage in AT&T System V UNIX, alongside the inclusion of named pipes.
mkfifo was invented in
IEEE Std 1003.2-1992 (“POSIX.2”) to
provide a way to create named pipes from interactive sessions
(mknod is not part of the
standard), including -m for symmetry with
mkdir(1); it appears in 4.3BSD-Reno and
AT&T System V Release 4 UNIX.