Difference between revisions of "Mkdir"

From wikieduonline
Jump to navigation Jump to search
Line 5: Line 5:
 
  -p, --parents
 
  -p, --parents
  
===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>
*<code>mkdir -p "$([[dirname]] "$1")" && touch "$1"</code>
 
  
 
===Options===
 
===Options===

Revision as of 01:17, 4 February 2022

wikipedia:mkdir command to create directories.

-p, --parents

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: