mkdircreate a new directory |
Command |
mkdir
[-p
] [-m
mode] directory...
mkdir
command creates a new directory for each named
directory argument.
-m
modelets you specify permissions for the directories. The mode
argument may have the same value as the mode for
chmod
; see
chmod
for more details.
-p
creates intermediate directory components that don't already exist. For
example, if one of the directory arguments is
dir/subdir/subsub
and subdir
doesn't already
exist, mkdir
creates it. Directories are created with
the mode u+wx
, which means read, write and search
permissions for the owner.
0
Successful completion.
1
Failure due to any of the following:
-m
means that the preceding structure (parent directory) of the named directory does not exist.
means that the requested directory already exists or is otherwise inaccessible.
means that some other error occurred during creation of the directory.