Difference between revisions of "Mkdir"

From wikieduonline
Jump to navigation Jump to search
Line 20: Line 20:
  
 
===Options===
 
===Options===
*<code>-p, --parents makes parents directories if needed and [[no error]] if existing</code>
+
*<code>-p, --parents makes parents directories if needed and [[exit|no error if existing]]</code>
  
 
== Related commands ==
 
== Related commands ==

Revision as of 06:06, 9 August 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"
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

Related commands

See also

Advertising: