mknod

Name

mknod -- make a directory, a special or regular file

Synopsis

int mknod(const char *path, mode_t mode, dev_t dev);

Description

The mknod() function attempts to create a filesystem node named by the pathname to which the argument path points. GNU and POSIX specifications for this function vary in the following areas.

Node Type

Node type is specified in the mode argument (using the bitwise OR) from the symb olic constants S_IFREG, S_IFCHR, S_IFBLK, and S_IFIFO.

GNU specifies that:

POSIX specifies that:

Node Permissions

Permissions are specified in the mode argument.

GNU specifies that:

POSIX specifies that:

Errors

GNU specifies the following error conditions that are not reflected in POSIX:

POSIX specifies the following error conditions that are not reflected in GNU: