|
|
1.1 ! root 1: .\" Copyright (c) 1983 The Regents of the University of California. ! 2: .\" All rights reserved. ! 3: .\" ! 4: .\" Redistribution and use in source and binary forms are permitted provided ! 5: .\" that: (1) source distributions retain this entire copyright notice and ! 6: .\" comment, and (2) distributions including binaries display the following ! 7: .\" acknowledgement: ``This product includes software developed by the ! 8: .\" University of California, Berkeley and its contributors'' in the ! 9: .\" documentation or other materials provided with the distribution and in ! 10: .\" all advertising materials mentioning features or use of this software. ! 11: .\" Neither the name of the University nor the names of its contributors may ! 12: .\" be used to endorse or promote products derived from this software without ! 13: .\" specific prior written permission. ! 14: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED ! 15: .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF ! 16: .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 17: .\" ! 18: .\" @(#)mkdir.2 6.6 (Berkeley) 6/23/90 ! 19: .\" ! 20: .TH MKDIR 2 "June 23, 1990" ! 21: .UC 5 ! 22: .SH NAME ! 23: mkdir \- make a directory file ! 24: .SH SYNOPSIS ! 25: .nf ! 26: .ft B ! 27: mkdir(path, mode) ! 28: char *path; ! 29: int mode; ! 30: .fi ! 31: .ft R ! 32: .SH DESCRIPTION ! 33: .I Mkdir ! 34: creates a new directory file with name ! 35: .IR path . ! 36: The mode of the new file ! 37: is initialized from ! 38: .IR mode . ! 39: (The protection part of the mode ! 40: is modified by the process's mode mask; see ! 41: .IR umask (2)). ! 42: .PP ! 43: The directory's owner ID is set to the process's effective user ID. ! 44: The directory's group ID is set to that of the parent directory in ! 45: which it is created. ! 46: .PP ! 47: The low-order 9 bits of mode are modified by the process's ! 48: file mode creation mask: all bits set in the process's file mode ! 49: creation mask are cleared. See ! 50: .IR umask (2). ! 51: .SH "RETURN VALUE ! 52: A 0 return value indicates success. A \-1 return value ! 53: indicates an error, and an error code is stored in ! 54: .I errno. ! 55: .SH "ERRORS ! 56: .I Mkdir ! 57: will fail and no directory will be created if: ! 58: .TP 15 ! 59: [ENOTDIR] ! 60: A component of the path prefix is not a directory. ! 61: .TP 15 ! 62: [EINVAL] ! 63: The pathname contains a character with the high-order bit set. ! 64: .TP 15 ! 65: [ENAMETOOLONG] ! 66: A component of a pathname exceeded 255 characters, ! 67: or an entire path name exceeded 1023 characters. ! 68: .TP 15 ! 69: [ENOENT] ! 70: A component of the path prefix does not exist. ! 71: .TP 15 ! 72: [EACCES] ! 73: Search permission is denied for a component of the path prefix. ! 74: .TP 15 ! 75: [ELOOP] ! 76: Too many symbolic links were encountered in translating the pathname. ! 77: .TP 15 ! 78: [EPERM] ! 79: The \fIpath\fP argument contains a byte with the high-order bit set. ! 80: .TP 15 ! 81: [EROFS] ! 82: The named file resides on a read-only file system. ! 83: .TP 15 ! 84: [EEXIST] ! 85: The named file exists. ! 86: .TP 15 ! 87: [ENOSPC] ! 88: The directory in which the entry for the new directory is being placed ! 89: cannot be extended because there is no space left on the file ! 90: system containing the directory. ! 91: .TP 15 ! 92: [ENOSPC] ! 93: The new directory cannot be created because there ! 94: there is no space left on the file ! 95: system that will contain the directory. ! 96: .TP 15 ! 97: [ENOSPC] ! 98: There are no free inodes on the file system on which the ! 99: directory is being created. ! 100: .TP 15 ! 101: [EDQUOT] ! 102: The directory in which the entry for the new directory ! 103: is being placed cannot be extended because the ! 104: user's quota of disk blocks on the file system ! 105: containing the directory has been exhausted. ! 106: .TP 15 ! 107: [EDQUOT] ! 108: The new directory cannot be created because the user's ! 109: quota of disk blocks on the file system that will ! 110: contain the directory has been exhausted. ! 111: .TP 15 ! 112: [EDQUOT] ! 113: The user's quota of inodes on the file system on ! 114: which the directory is being created has been exhausted. ! 115: .TP 15 ! 116: [EIO] ! 117: An I/O error occurred while making the directory entry or allocating the inode. ! 118: .TP 15 ! 119: [EIO] ! 120: An I/O error occurred while reading from or writing to the file system. ! 121: .TP 15 ! 122: [EFAULT] ! 123: .I Path ! 124: points outside the process's allocated address space. ! 125: .SH "SEE ALSO" ! 126: chmod(2), stat(2), umask(2)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.