mkdir(1)

mkdir(1)

mkdir returns exit code 0 if the -poption was speci®ed, and all the speci®ed directories now exist. If any of the intermediate directories do not have search or write permission (with the -poption), mkdir prints a diagnostic and returns non-zero.

EXAMPLES

Create directory gem beneath existing directory raw in the current directory: mkdir raw/gem

Create directory path raw/gem/diamond underneath the current directory and set permissions on directory diamond to read-only for all users (a=r):

mkdir -p -m "a=r" raw/gem/diamond

which is equivalent to (see chmod(1)):

mkdir -p -m 444 raw/gem/diamond

If directories raw or raw and gem already exist, only the missing directories in the speci®ed path are created.

SEE ALSO

rm(1), setacl(1), sh(1), umask(1), aclv(5).

STANDARDS CONFORMANCE

mkdir: SVID2, SVID3, XPG2, XPG3, XPG4, POSIX.2

m

Section 1530

− 2 −

HP-UX Release 11i: December 2000