mkdir of Linux Basic command parameters

Source: Internet
Author: User

In Linux the basic commands are written as:

command [ parameter Options ] [ file or path ]

The command to be used [ This is the one that needs to be variable but must be matched with the command used ] [ the file or path to be processed or consulted ]

1:makedirectorys Chinese meaning to create a directory, in the use of the command to reflect the way mkdir.

Example 1:mkdir/data This command means to create the data in the /(root directory) directory the directory.

Example 2:cd/;mkdir data The meaning of this command first use the CD command to jump to / (root directory) inside the command that uses mkdir to create data ( Note ' This semicolon is interesting in that it means separating the two commands within the same line .

650) this.width=650; "Width=" 347 "height=" "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ( "/e/u261/themes/default/images/word.gif") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>( Note that in #前面的括号里的~ This indicates that the path to the current operation is to create the data in the /(root directory) path, so the CD is used to jump the command, and (;) is to separate two commands within the same line as mkdir.)

  650) this.width=650; "Width=" 294 "height=" "src=" /e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/themes/default/images/word.gif") No-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/> ( already in / don't add / this path has ).

650) this.width=650; "width=" 325 "height=" [src=]/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/themes/default/images/word.gif") no-repeat center;border:1px solid #ddd; "alt=" spacer.gif "/ >( The use of this method is to add /(root directory) This path usage ).

mkdir The parameters of this command, query method with man mkdir this command query.

650) this.width=650, "width=" 315 "height=" "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ( "/e/u261/themes/default/images/word.gif") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>

mkdir parameter Analysis and use example:

1:-m--mode=mode

Set file Mode ( as in chmod), not a=rwx-umask

-M This parameter's command parsing:m equals mode(pattern) meaning, internal meaning has changed umask default property usage is chmod.

Operation Case:

650) this.width=650; "width=" 321 "height=" [src=]/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/themes/default/images/word.gif") no-repeat center;border:1px solid #ddd; "alt=" spacer.gif "/ >650) this.width=650; "width=" 392 "height=" "src="/e/u261/themes/default/images/spacer.gif "style=" background: URL ("/e/u261/themes/default/images/word.gif") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/> Create a directory permission for data to the default permissions rwx-xr-x

650) this.width=650 "width=" 408 "height=" "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ( "/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>however, after using the- m parameter , the parameters after the creation of the data directory arerwx-r-x---(r=4,w=2,x=1,) where R stands for readable,w stands for writable,x Represents an executable, with a number representing 4,2,1.


2:-P--parents

No error if existing, make parent directoies as needed.

-P equals parents(dual) You can create multiple subdirectories consecutively in a directory that you create, such as recursive creation .

Case:

First create a directory data

650) this.width=650; "width=" 299 "height=" "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/themes/default/images/word.gif") no-repeat center;border:1px solid #ddd; "alt=" spacer.gif "/ >

                            650) this.width=650 "width=" 554 "height=" "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ( "/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>use CD to switch to this data directory and use mkdir in creating subdirectories data2 in the data2 directory while creating the data3 This directory results in a display that cannot create a directory data2/data3: No such file or directory or file error message . If you want to create this, you need to add the parameter - p after mkdir .     650) this.width=650, "width=", "height=", "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ( "/e/u261/themes/default/images/word.gif") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>

650) this.width=650; "width=" 310 "height=" "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>

650) this.width=650; "Width=" 554 "height=" "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ( "/e/u261/themes/default/images/word.gif") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>

After adding- p This parameter has been successfully created, plus - p can create more than one such subdirectory. So - p This parameter is exactly the parameter of the recursive creation directory .

3:-v--verbos(verbose)

Print a message for each created directory

Print a message for each directory you create

Case:

650) this.width=650, "width=", "height=", "src="/e/u261/themes/default/images/spacer.gif, "style=" Background:url ("/e/u261/themes/default/images/word.gif") no-repeat center;border:1px solid #ddd; "alt=" spacer.gif "/ > Print Create information, I do not understand the use of this parameter, but I think it should be a combination with- p parameters.


mkdir of Linux Basic command parameters

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.