MKDIR (1)

NAME

mkdir - make a directory

CONTENTS

Synopsis
Description
See Also
Diagnostics

SYNOPSIS

mkdir [-m mode] [-p] dirname ...

DESCRIPTION

Mkdir creates specified directories in mode 777, taking the file creation mask into account (see umask(2)). Standard entries, '.', for the directory itself, and '..' for its parent, are made automatically.

Mkdir requires write permission in the parent directory.

The following options are accepted:
-m mode Uses the given mode to create the directory, ignoring the file creation mask. Mode can be given in octal or in symbolic form, as described in chmod(1). The set-group-ID bit is ignored when present in an octal mode.
-p Creates any missing parent directories. If the -m option is also present, newly created parent directories have the specified mode with /usr/5bin/mkdir; with /usr/5bin/s42/mkdir, /usr/5bin/posix/mkdir, and /usr/5bin/posix2001/mkdir, the default mode minus umask plus write and execute permission for the invoking user is always applied.

If the set-group-ID bit is set on the parent directory of a newly created directory, it is inherited regardless of the -m option unless explicitly specified as a symbolic mode with '+' or '-'.

SEE ALSO

chmod(1), rmdir(1), mkdir(2), umask(2)

DIAGNOSTICS

Mkdir returns exit code 0 if all directories were successfully made. Otherwise it prints a diagnostic and returns nonzero.


Heirloom Toolchest MKDIR (1) 1/24/05
Generated by a modified version of manServer 1.07 from mkdir.1 using man macros.