totn UNIX

UNIX Basic commands: mkdir

The mkdir command creates a single directories or multiple directories.

Syntax

The syntax for the mkdir command is:

mkdir [options] directories

Options

Option Description
-m mode Sets the access mode for the new directory.
-p If the parent directories don't exist, this command creates them.

Example

mkdir -m 444 tech
mkdir -p tech/net/faqs

* Please note that there are many flavors of UNIX, so if in doubt, consult your man pages.