Difference between revisions of "Mkdir"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
 
(17 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{lowercase}}
 
[[wikipedia:mkdir]] command to create [[directories]].
 
[[wikipedia:mkdir]] command to create [[directories]].
 
* Man page: https://man7.org/linux/man-pages/man1/mkdir.1.html
 
* Man page: https://man7.org/linux/man-pages/man1/mkdir.1.html
 +
* <code>[[mkdir --help]]</code>
 +
-p, --parents
  
 +
== Examples ==
 +
* <code>mkdir -p /path/to/your/new/dir</code>
 +
* <code>mkdir ~/[[.ssh]]</code>
 +
* <code>mkdir -p "$([[dirname]] "$1")" && [[touch]] "$1"</code>
 +
* <code>[[mkdir -p]] /your_path/{dir1,dir2}</code>
  
 +
mkdir -p /path/to/your/new/dir
 +
mkdir: cannot create directory ‘/path’: [[Read-only file system]]
  
Examples:
+
mkdir /tmp
* <code>mkdir -p /path/to/your/new/dir</code>
+
mkdir: cannot create directory ‘/tmp’: File exists
* <code>mkdir ~/[[.ssh]]</code>
 
  
 +
mkdir -p /tmp
 +
(no output)
  
  -p, --parents makes parents directories if needed
+
===Options===
 +
*<code>-p, --parents makes parents directories if needed and [[exit|no error if existing]]</code>
  
 
== Related commands ==
 
== Related commands ==
Line 15: Line 27:
 
* <code>[[useradd]]</code>
 
* <code>[[useradd]]</code>
 
* <code>[[touch]]</code>
 
* <code>[[touch]]</code>
 +
* <code>[[dirname]]</code>
 +
* <code>[[aws s3 mb]]</code>
 +
* <code>[[touch]]</code>
 +
* <code>[[mkcd]]</code> [[omz]]
  
 
== See also ==
 
== See also ==

Latest revision as of 19:25, 28 May 2023

wikipedia:mkdir command to create directories.

-p, --parents

Examples[edit]

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]

Related commands[edit]

See also[edit]

Advertising: