mkfifo - Make FIFO special files

Synopsis

mkfifo [-p] [-m mode] file ...

Description

The mkfifo utility creates the FIFO special files named as operands, in the order specified, using a default mode that allows read and write permission for the owner, group, and others (0666) as modified by the current file creation mask.

The user must have write permission in the parent directory.

Options

-m mode
Set the file permission bits of the FIFO special file to the specified mode. The mode argument can be in any of the formats supported by the chmod command. If a symbolic mode is specified, the operation characters + and - are interpreted relative to an initial mode of "a=rw".
-p
Create intermediate directories as required. If this option is not specified, the full path prefix of each file must already exist. Intermediate directories are created with a default mode that allows read, write, and search permission for the owner, group, and others (0777) as modified by the current file creation mask.

Operands

Each file is the path name of FIFO special file.

Exit Status

Related information

Examples
  1. Create the FIFO special files "fifo1" and "fifo1":
    mkfifo fifo1 fifo2
    
  2. Create the the FIFO special file "fifo1" and set the permissons to read, write and execute for the owner:
    mkfifo -m 700 myfifo
    
  3. Create the the FIFO special file "/dir1/dir2/fifo1" and each directory in the path that does not exist:
    mkfifo -p /dir1/dir2/fifo1