.TH MKDIR 2 "27 July 1983"
mkdir \- make a directory file
creates a new directory file with name
(The protection part of the mode
is modified by the process's mode mask; see
The directory's owner ID is set to the process's effective user ID.
The directory's group ID is set to that of the parent directory in
The low-order 9 bits of mode are modified by the process's
file mode creation mask: all bits set in the process's file mode
creation mask are cleared. See
A 0 return value indicates success. A \-1 return value
indicates an error, and an error code is stored in
will fail and no directory will be created if:
The process's effective user ID is not super-user.
The \fIpath\fP argument contains a byte with the high-order bit set.
A component of the path prefix is not a directory.
A component of the path prefix does not exist.
The named file resides on a read-only file system.
points outside the process's allocated address space.
Too many symbolic links were encountered in translating the pathname.
An I/O error occured while writing to the file system.
chmod(2), stat(2), umask(2)