Linux mkdir Create Folder command

Source: Internet
Author: User

Introduced:

This command creates the specified directory name, requires the user who created the directory to have write permissions in the current directory, and the specified directory name cannot be a directory that is already in the current directory

Grammar:

mkdir [-M] [-p] Directory name

Option Description:

-M: Set access permissions on the new directory or set with the chmod command;

-P: Can be a path name. In this case, if some directories in the path do not already exist, and with this option, the system will automatically establish those that do not already exist, that is, multiple directories can be established at one time;

Example of execution:

[[email protected] ~]$  mkdir dira[[email protected] ~]$  ls dira[[email protected] ~]$  mkdir-m 775 Dirb[[emai L protected] ~]$  ls-ldrwxr-xr-x  2 xxxx users 4096 Feb 22:29 diradrwxrwxr-x  2 xxxx users 4096 Feb 19 22:30 Dirb[[email protected] ~]$  mkdir-p dirc/hello[[email protected] ~]$  ls-ldrwxr-xr-x  2 xxxx users 4096 Feb 19 22:29 diradrwxrwxr-x  2 xxxx users 4096 Feb 22:30 dirbdrwxr-xr-x  3 xxxx users 4096 Feb 22:31 Dirc[[email Pro tected] ~]$  ls Dirchello
mkdir- p /usr/local/apache

Linux mkdir Create Folder command

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.