BSD 4_4 development
[unix-history] / usr / share / man / cat2 / mkdir.0
MKDIR(2) BSD Programmer's Manual MKDIR(2)
N\bNA\bAM\bME\bE
m\bmk\bkd\bdi\bir\br - make a directory file
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
#\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<s\bsy\bys\bs/\b/s\bst\bta\bat\bt.\b.h\bh>\b>
_\bi_\bn_\bt
m\bmk\bkd\bdi\bir\br(_\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bp_\ba_\bt_\bh, _\bm_\bo_\bd_\be_\b__\bt _\bm_\bo_\bd_\be);
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
The directory _\bp_\ba_\bt_\bh is created with the access permissions specified by
_\bm_\bo_\bd_\be and restricted by the the umask(2) of the calling process.
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 which it
is created.
R\bRE\bET\bTU\bUR\bRN\bN V\bVA\bAL\bLU\bUE\bES\bS
A 0 return value indicates success. A -1 return value indicates an er-
ror, and an error code is stored in _\be_\br_\br_\bn_\bo.
E\bER\bRR\bRO\bOR\bRS\bS
M\bMk\bkd\bdi\bir\br() will fail and no directory will be created if:
[ENOTDIR] A component of the path prefix is not a directory.
[EINVAL] The pathname contains a character with the high-order bit
set.
[ENAMETOOLONG]
A component of a pathname exceeded 255 characters, or an en-
tire path name exceeded 1023 characters.
[ENOENT] A component of the path prefix does not exist.
[EACCES] Search permission is denied for a component of the path pre-
fix.
[ELOOP] Too many symbolic links were encountered in translating the
pathname.
[EPERM] The _\bp_\ba_\bt_\bh argument contains a byte with the high-order bit
set.
[EROFS] The named file resides on a read-only file system.
[EEXIST] The named file exists.
[ENOSPC] The directory in which the entry for the new directory is be-
ing placed cannot be extended because there is no space left
on the file system containing the directory.
[ENOSPC] The new directory cannot be created because there there is no
space left on the file system that will contain the directo-
ry.
[ENOSPC] There are no free inodes on the file system on which the di-
rectory is being created.
[EDQUOT] The directory in which the entry for the new directory is be-
ing placed cannot be extended because the user's quota of
disk blocks on the file system containing the directory has
been exhausted.
[EDQUOT] The new directory cannot be created because the user's quota
of disk blocks on the file system that will contain the di-
rectory has been exhausted.
[EDQUOT] The user's quota of inodes on the file system on which the
directory is being created has been exhausted.
[EIO] An I/O error occurred while making the directory entry or al-
locating the inode.
[EIO] An I/O error occurred while reading from or writing to the
file system.
[EFAULT] _\bP_\ba_\bt_\bh points outside the process's allocated address space.
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
chmod(2), stat(2), umask(2)
S\bST\bTA\bAN\bND\bDA\bAR\bRD\bDS\bS
M\bMk\bkd\bdi\bir\br() conforms to IEEE Std 1003.1-1988 (``POSIX'').
4.2 Berkeley Distribution June 4, 1993 2