mkdir(1)
NAME
mkdir − make directories
SYNOPSIS
mkdir [ −m mode ] [ −p ] dirname...
AVAILABILITY
SUNWcsu
DESCRIPTION
mkdir creates the named directories in mode 777 (possibly altered by 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. The behavior mimics the mkdir(2) system call.
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 dirname by creating all the non-existing parent directories first.
EXAMPLES
The following example:
example% mkdir -p ltr/jd/jan
creates the subdirectory structure ltr/jd/jan.
ENVIRONMENT
If any of the LC_∗ variables ( LC_CTYPE, LC_MESSAGES, LC_TIME, LC_COLLATE, LC_NUMERIC, and LC_MONETARY ) (see environ(5)) are not set in the environment, the operational behavior of mkdir for each corresponding locale category is determined by the value of the LANG environment variable. If LC_ALL is set, its contents are used to override both the LANG and the other LC_∗ variables. If none of the above variables is set in the environment, the "C" (U.S. style) locale determines how mkdir behaves.
LC_CTYPE
Determines how mkdir handles characters. When LC_CTYPE is set to a valid value, mkdir can display and handle text and filenames containing valid characters for that locale. mkdir can display and handle Extended Unix Code (EUC) characters where any individual character can be 1, 2, or 3 bytes wide. mkdir can also handle EUC characters of 1, 2, or more column widths. In the "C" locale, only characters from ISO 8859-1 are valid.
LC_MESSAGES
Determines how diagnostic and informative messages are presented. This includes the language and style of the messages, and the correct form of affirmative and negative responses. In the "C" locale, the messages are presented in the default form found in the program itself (in most cases, U.S. English).
SEE ALSO
rm(1), sh(1), umask(1), intro(2), mkdir(2), environ(5)
DIAGNOSTICS
mkdir returns exit code 0 if all directories given in the command line were made successfully. Otherwise, it prints a diagnostic and returns non-zero.
SunOS 5.4 — Last change: 26 Sep 1992