NAME
- mkdir– make directories
SYNOPSIS
- mkdir [-m mode] [-p] dir…
DESCRIPTION
The mkdir command creates the named directories in mode 777 (possibly altered by the file mode creation mask umask(1)).
Standard entries in a directory (for instance, the files “.”, for the directory itself, and “. .”, for its parent) are made automatically. mkdir cannot create these entries by name. Creation of a directory requires write permission in the parent directory.
The owner-ID and group-ID of the new directories are set to the process's effective user-ID and group-ID, respectively. mkdir calls the mkdir(2) system call.
setgid and mkdir
To change the setgid bit on a newly created directory, you must use chmod g+s or chmod g-s after executing mkdir.
The setgid bit setting is inherited from the parent directory.
OPTIONS
- -m mode
-
This option allows users to specify the mode to be used for new directories. Choices for modes can be found in chmod(1).
- -p
-
With this option, mkdir creates dir by creating all the non-existing parent directories first. The mode given to intermediate directories will be the difference between 777 and the bits set in the file mode creation mask. The difference, however, must be at least 300 (write and execute permission for the user).
The following options are supported:
OPERANDS
USAGE
See largefile(5) for the description of the behavior of mkdir when encountering files greater than or equal to 2 Gbyte ( 231 bytes).
EXAMPLES
Example 1 Using mkdir
The following example:
example% mkdir -p ltr/jd/jan |
ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of mkdir: LC_CTYPE, LC_MESSAGES, and NLSPATH.
EXIT STATUS
- 0
-
All the specified directories were created successfully or the -p option was specified and all the specified directories now exist.
- >0
-
An error occurred.
The following exit values are returned:
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Availability | SUNWcsu |
CSI | enabled |
SEE ALSO
'Device & Language > Solaris 10' 카테고리의 다른 글
ypserv, ypxfrd– NIS server and binder processes (0) | 2010.09.05 |
---|---|
ypbind– NIS binder process (0) | 2010.09.05 |
zfs– configures ZFS file systems (0) | 2010.09.05 |
coreadm– core file administration (0) | 2010.09.05 |
share– make local resource available for mounting by remote systems (0) | 2010.09.05 |