Mkdir -- command,

Source: Internet
Author: User

Mkdir -- command,

MkdirCommand

Mkdir: the abbreviation of make directory (ies), used to create a directory

1. Syntax

Mkdir [OPTION]... DIRECTORY

Note: Option is a selection, optional, and directory is the name of the directory to be created

2. Options

 

3. Parameters

Directory: Specify the directory to be created. multiple directories are separated by spaces.

4. Instances

[Root @ oldboy/] # mkdir oldboy#Create the oldboy directory under the root/directory

[Root @ oldboy/] # mkdir oldboy#If a directory already exists, you cannot create a directory.

Mkdir: Unable to create directory "oldboy": The file already exists

[Root @ oldboy/] # mkdir-p oldboy/test/geng#-PThe parameter is used to create a directory recursively. If the file exists, it will not be treated as an error. If the file does not exist, the directory will be created layer by layer.

-V parameter to display the Directory creation process:

[Root @ oldboy/] # mkdir-p oldboy/a/B/c-v#-VParameters are used to display the Directory creation process.

Mkdir: the directory "oldboy/a" has been created"#First create directory

Mkdir: the directory "oldboy/a/B" has been created"#Create directory B

Mkdir: the directory "oldboy/a/B/c" has been created"#Create directory c

Remarks: The-p parameter is commonly used to create a directory recursively. If a directory exists, no errors will occur. The-v parameter shows the Directory creation process, which is not commonly used. Beginners can check the Directory creation process, it is easy to understand how the-p parameter is recursively created.

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.