mkdir.2
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 2 代码 · 共 130 行
2
130 行
.\" SCCSID: @(#)mkdir.2 4.1 12/9/88.TH mkdir 2.SH Namemkdir \- make a directory file.SH Syntax.nf.B #include <sys/types.h>.B #include <sys/stat.h>.PP.B mkdir(\fIpath, mode\fP).B char *\fIpath\fP;.B mode_t \fImode\fP;.fi.SH Description.NXR "mkdir system call".NXR "directory" "creating"The .PN mkdirsystem call creates a new directory file with name.IR path .The mode of the new fileis initialized from.IR mode .The protection part of the modeis modified by the process's mode mask. For further information, see.MS umask 2 ..PPThe 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 inwhich it is created..PPThe low-order 9 bits of mode are modified by the process'sfile mode creation mask: all bits set in the process's file modecreation mask are cleared. For further information, see.MS umask 2..SH Return ValuesA 0 return value indicates success. A \-1 return valueindicates an error, and an error code is stored in.I errno..SH DiagnosticsThe.PN mkdirsystem call fails and a directory is not created if the followingoccurs:.TP 12[EISDIR]The named file is a directory, and the arguments specify it isto be opened for writing..TP[ENOTDIR]A component of the path prefix is not a directory..TP[ENAMETOOLONG]A component of a pathname exceeded 255 characters, or anentire pathname exceeded 1023 characters..TP[ENOENT]A component of the path prefix does not exist or the pathargument points to an empty string and the environmentdefined is POSIX or SYSTEM_FIVE..TP[EACCES]Search permission is denied for a component of the path prefix,or write permission is denied on the parent directory to be created..TP[EROFS]The named file resides on a read-only file system..TP[EEXIST]The named file exists..TP[EFAULT]The.I pathpoints outside the process's allocated address space..TP[ELOOP]Too many symbolic links were encountered in translating the pathname..TP[EIO]An I/O error occurred while reading from or writing to the file system..TP[EIO]An I/O error occurred while making the directory entry orallocating the inode..TP[ENOSPC]The directory in which the entry for the new directory is being placedcannot be extended, because there is no space left on the filesystem containing the directory..TP[ENOSPC]The new directory cannot be created, because there is no space lefton the file system that will contain the directory..TP[ENOSPC]There are no free inodes on the file system on which thedirectory is being created..TP[EDQUOT]The directory in which the entry for the new directoryis being placed cannot be extended, because theuser's quota of disk blocks on the file systemcontaining the directory has been exhausted..TP[EDQUOT]The new directory cannot be created, because the user'squota of disk blocks on the file system that will containthe directory has been exhausted..TP[EDQUOT]The user's quota of inodes on the file system on which thedirectory is being created has been exhausted..TP[ESTALE]The file handle given in the argument is invalid. Thefile referred to by that file handle no longer exists or has been revoked..TP[ETIMEDOUT]A "connect" request or remote file operation failedbecause the connected partydid not properly respond after a periodof time that is dependent on the communications protocol..TP[EMLINK]The link count of the parent directory would exceed {LINK_MAX}..SH See Alsochmod(2), stat(2), umask(2)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?