Linux

mkdir attemts to create a directory or directories

mkdir command Syntax

$ mkdir directory_name

Options Description
-p with this option specified, no error will be reported if a directory given as an operand already exists.

mkdir command examples

Creates a directory

 $ mkdir test

Creates a test2 directory under test

 $ mkdir test/test2

Attempts to create a directory that already exists results in an error

 $ mkdir test/test2
mkdir: test/test2: File exists

There won’t be any error if you add the -p option

 $ mkdir -p test/test2