Difference between revisions of "Mkdir"
Jump to navigation
Jump to search
Line 4: | Line 4: | ||
* <code>[[mkdir --help]]</code> | * <code>[[mkdir --help]]</code> | ||
− | + | ===Examples=== | |
− | |||
− | Examples | ||
* <code>mkdir -p /path/to/your/new/dir</code> | * <code>mkdir -p /path/to/your/new/dir</code> | ||
* <code>mkdir ~/[[.ssh]]</code> | * <code>mkdir ~/[[.ssh]]</code> | ||
− | + | *<code>mkdir -p "$([[dirname]] "$1")" && touch "$1"</code> | |
− | Options | + | ===Options=== |
− | + | *<code>-p, --parents makes parents directories if needed</code> | |
== Related commands == | == Related commands == |
Revision as of 21:12, 4 October 2021
wikipedia:mkdir command to create directories.
Contents
Examples
mkdir -p /path/to/your/new/dir
mkdir ~/.ssh
mkdir -p "$(dirname "$1")" && touch "$1"
Options
-p, --parents makes parents directories if needed
Related commands
See also
Advertising: