mkdir

Create a folder

What it does

mkdir creates one or more folders: mkdir logs tmp. If the parent folder does not exist, it fails.

-p creates the whole path at once, missing parents included, and does not complain if the folder already exists. That makes mkdir -p handy in scripts.

Syntax

mkdir <folder>…
mkdir -p <path>

Examples

Related commands

Practise · All commands