mkdir
Jump to navigation
Jump to search
wikipedia:mkdir command to create directories.
-p, --parents
Examples[edit]
mkdir -p /path/to/your/new/dir
mkdir ~/.ssh
mkdir -p "$(dirname "$1")" && touch "$1"
mkdir -p /your_path/{dir1,dir2}
mkdir -p /path/to/your/new/dir mkdir: cannot create directory ‘/path’: Read-only file system
mkdir /tmp mkdir: cannot create directory ‘/tmp’: File exists
mkdir -p /tmp (no output)
Options[edit]
-p, --parents makes parents directories if needed and no error if existing
Related commands[edit]
See also[edit]
Advertising: