Linux command--mkdir

Source: Internet
Author: User

  1. Command format:

    mkdir [Options] directory (option not writable)

  2. Command function:

    Create an empty directory

  3. Common options:

    - m Setting directory Permissions

    - p Recursive creation of multiple directories

    - v displays detailed process information

  4. Common examples:

    Example one: Create a directory named Dir

    Command: mkdir dir

    Example two: Create multiple directories at the same time Dir1, Dir2, Dir3

    Command: mkdir dir1 dir2 dir3

    Example three: Create multiple directories recursively, such as to create a dir2 directory under/dir/dir1/

    Command: mkdir-p /dir/dir1/dir2

    Note: When you use the-P option, both directories are created when/dir and/dir/dir1 do not exist, indicating that recursive creation

    Example four: Create a directory named Dir with permission 777

    Command: mkdir-m 777 dir

    Example five: Create the directory structure required for a project and display details when it is created

    Command: MKDIR-PV 1/{2,3/{a,b},4/{c,d}}

    Description: The meaning of this command is to create a directory in which there are directories 2, 3, 4, and A and B two directories in the 1/3 directory, with C and D 1/4 directories in two. If a project is to be done, you can first plan the corresponding directory and create

    The details displayed are: mkdir: To create directory ' 1 '

    mkdir: To create a directory ' a '

    mkdir: To create directory ' 1/3 '

    mkdir: To create directory ' 1/3/a '

    mkdir: To create directory ' 1/3/b '

    mkdir: To create a directory ' quarter '

    mkdir: To create directory ' 1/4/c '

    mkdir: To create directory ' 1/4/d '

This article is from the "Shiyu" blog, make sure to keep this source http://928004321.blog.51cto.com/10707688/1731306

Linux command--mkdir

Related Article

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.