mdawar.dev

A blog about programming, Web development, Open Source, Linux and DevOps.

Create a Directory if It Does Not Exist

Using mkdir with the -p or --parents argument creates the directory if it does not exist along with the parent directories as needed.

bash
$mkdir -p ./path/to/dir