📄 mkdir.2
字号:
.\" Copyright (c) 1983 Regents of the University of California..\" All rights reserved. The Berkeley software License Agreement.\" specifies the terms and conditions for redistribution..\".\" @(#)mkdir.2 6.4 (Berkeley) 8/26/85.\".TH MKDIR 2 "August 26, 1985".UC 5.SH NAMEmkdir \- make a directory file.SH SYNOPSIS.nf.ft B#include <sys/types.h>#include <sys/stat.h>int mkdir(const char *\fIpath\fP, mode_t \fImode\fP).fi.ft R.SH DESCRIPTION.B Mkdircreates 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; see.BR 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. See.BR umask (2)..SH "RETURN VALUEA 0 return value indicates success. A \-1 return valueindicates an error, and an error code is stored in.B errno..SH "ERRORS.B Mkdirwill fail and no directory will be created if:.TP 15[ENOTDIR]A component of the path prefix is not a directory..TP 15[ENAMETOOLONG]The path name exceeds PATH_MAX characters..TP 15[ENOENT]A component of the path prefix does not exist..TP 15[EACCES]Search permission is denied for a component of the path prefix..TP 15[ELOOP]Too many symbolic links were encountered in translating the pathname.(Minix-vmd).TP 15[EROFS]The named file resides on a read-only file system..TP 15[EEXIST]The named file exists..TP 15[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 15[ENOSPC]The new directory cannot be created because therethere is no space left on the filesystem that will contain the directory..TP 15[ENOSPC]There are no free inodes on the file system on which thedirectory is being created..ig.TP 15[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 15[EDQUOT]The new directory cannot be created because the user'squota of disk blocks on the file system that willcontain the directory has been exhausted..TP 15[EDQUOT]The user's quota of inodes on the file system onwhich the directory is being created has been exhausted....TP 15[EIO]An I/O error occurred while making the directory entry or allocating the inode..TP 15[EIO]An I/O error occurred while reading from or writing to the file system..TP 15[EFAULT].I Pathpoints outside the process's allocated address space..SH "SEE ALSO".BR chmod (2),.BR stat (2),.BR umask (2).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -