[manual index][section index]


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.




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.

MKDIR(1 ) Rev:  Thu Feb 15 14:42:47 GMT 2007