mkdir creates directories with the specified names. Synopsis:
mkdir [option]... name...
mkdir creates each directory name in the order given. It reports an error if name already exists, unless the -p option is given and name is a directory.
The program accepts the following options. Also see Common options.
Normally the directory has the desired file mode bits at the moment it
is created. As a GNU extension, mode may also mention
special mode bits, but in this case there may be a temporary window
during which the directory exists but its special mode bits are
incorrect. See Directory Setuid and Setgid, for how the
set-user-ID and set-group-ID bits of directories are inherited unless
overridden in this way.
To set the file permission bits of any newly-created parent
directories to a value that includes ‘u+wx’, you can set the
umask before invoking mkdir. For example, if the shell
command ‘(umask u=rwx,go=rx; mkdir -p P/Q)’ creates the parent
P it sets the parent's permission bits to ‘u=rwx,go=rx’.
To set a parent's special mode bits as well, you can invoke
chmod after mkdir. See Directory Setuid and Setgid, for how the set-user-ID and set-group-ID bits of
newly-created parent directories are inherited.
An exit status of zero indicates success, and a nonzero value indicates failure.