Linux Command - mkdir

mkdir - Creates a directory. Current user must have write permission in the current directory in order to create a new directory.

Syntax

1
mkdir [OPTION]... DIRECTORY...

Description

Option Description
-m, --mode=MODE set the file mode
-v, –verbose print a message for each created directory
-p, --parents create parent directories as needed

Example

create a directory

1
mkdir dirName

create a directory and print a message

1
mkdir -v dirName2

create a directory recursively

1
2
mkdir -p dir1/dir2/dir3

Reference