mkdir

From RaySoft

mkdir creates directories with the specified NAMEs.[1]

Documentation

Syntax

mkdir [PARAMETER ...] DIRECTORY [DIRECTORY ...]

Parameters

-m MODE, --mode=MODE
Set file MODE (as in chmod), not a=rwx - umask.
-p, --parents
No error if existing, make parent directories as needed.
-Z CONTEXT, --context=CONTEXT
Set the SELinux security context of each created directory to CONTEXT.

Example

Make a directory if it doesn't exist
if [[ ! -d './tmp' ]]; then
  mkdir -p './tmp'
fi

References