MKDIR(1) General Commands Manual MKDIR(1)

mkdir - make a directory

mkdir [ -p ] [ dirname ... ]

Mkdir creates the specified directories. It requires write permission in the parent directory.

The -p option causes mkdir to create the whole path dirname, including any missing parent directories; it also will not complain if dirname already exists and is a directory.

The new directories are created with permissions starting with 8r777 but masked with the permissions of the parent directory according to the procedure followed by sys-open (2). For example, if the parent directory lacks write permission for group and has no permissions for others, so will the newly created directory.

/appl/cmd/mkdir.b

chmod (1), cd (1), rm (1), sys-open (2)

If any directory cannot be created successfully, mkdir prints a warning, and continues with any remaining directories, but returns "error" exit status at the end.