'\"macro stdmacro
.if n .pH g1.mkdir @(#)mkdir	41.1 of 12/12/89
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} mkdir 1 "Essential Utilities" "\&"
.if \nX=1 .ds x} mkdir 1 "Essential Utilities"
.if \nX=2 .ds x} mkdir 1 "" "\&"
.if \nX=3 .ds x} mkdir "" "" "\&"
.TH \*(x}
.SH NAME
\f4mkdir\f1 \- make directories
.SH SYNOPSIS
\f4mkdir\f1
[
\f4\-m\f1
mode ]  [
\f4\-p\f1]
dirname ...
.SH DESCRIPTION
\f4mkdir\fP
creates the named directories in mode 777
(possibly altered by 
\f4umask\fP(1)).
.PP
Standard entries in a directory
(e.g., the files
\f4\&.\f1,
for the directory itself,
and 
\f4\&..\f1,
for its parent)
are made automatically.
\f4mkdir\fP
cannot create these entries by name.
Creation of a directory requires write permission in the
parent directory.
.PP
The owner ID and group ID of the new directories are
set to the process's real user ID and group ID, respectively.
.PP
Two options apply to
\f4mkdir\fP:
.PP
.TP 5
\f4\-m\f1
This option allows users to specify the mode to be
used for new directories.
Choices for modes can be found in 
\f4chmod\fP(1).
.PP
.TP 5
\f4\-p\f1
With this option,
\f4mkdir\fP
creates
\f4dirname\fP
by creating all the non-existing parent directories first.
.SH EXAMPLE
To create the subdirectory structure
\f4ltr/jd/jan\f1,
type:
.sp
.ti +.5i
\f4mkdir -p ltr/jd/jan\f1
.SH "SEE ALSO"
\f4sh\fP(1), \f4rm\fP(1), \f4umask\fP(1).
.br
\f4intro\fP(2), \f4mkdir\fP(2)
in the
.IR "Programmer's Reference Manual\^" .
.SH DIAGNOSTICS
\f4mkdir\fP
returns exit code 0 if all directories given in the
command line were made successfully.
Otherwise, it prints a diagnostic and returns non-zero.
.Ee
