mkdir
mkdir creates directories with the specified NAMEs.[1]
- GNU Coreutils [EN] @ Fedora Package
- GNU Coreutils [EN] @ Homebrew Formula
Documentation
- mkdir [EN] @ GNU Coreutils Manual
- man 1 'mkdir' [EN]
Syntax
mkdir [PARAMETER ...] DIRECTORY [DIRECTORY ...]
Parameters
- -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