Difference between revisions of "Mkdir"

From wikieduonline
Jump to navigation Jump to search
Line 9: Line 9:
 
* <code>mkdir ~/[[.ssh]]</code>
 
* <code>mkdir ~/[[.ssh]]</code>
 
* <code>mkdir -p "$([[dirname]] "$1")" && [[touch]] "$1"</code>
 
* <code>mkdir -p "$([[dirname]] "$1")" && [[touch]] "$1"</code>
 +
* [[mkdir -p]] /your_path/{dir1,dir2}
  
 
  mkdir -p /path/to/your/new/dir
 
  mkdir -p /path/to/your/new/dir

Revision as of 19:25, 28 May 2023

wikipedia:mkdir command to create directories.

-p, --parents

Examples

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: