Linux Commands-mkdir: Creating a Directory

Source: Internet
Author: User
Command format

mkdir [OPTION] ... DIRECTORY...

Command parameters

-M,--mode=mode
Sets the mode of the file, similar to the chmod command.

-P,--parents
Creates an upper-level directory of the specified directory when needed, and is not treated as an error when the target directory already exists.

-V,--verbose
Information is displayed for each directory that is created.

-Z,--context=ctx
Set the SELinux security environment for each directory you create to CTX.

--help
Displays help information.

--version
Displays version information.

Instance

A) displays information when the catalog is created.

mkdir-v AAAmkdir:created directory ' AAA '

b) Set permissions when creating the directory.

mkdir-m A=RW BBB [[email protected] cmdline]$ ls-ltotal 8drwxrwxr-x 2 ucm ucm 4096 Oct  1 10:36 aaadrw-rw-rw-2 ucm ucm 4096 Oct  1 10:37 BBB

c) created automatically when the upper-level directory of the target directory does not exist.

MKDIR-VP ccc/xxxmkdir:created directory ' CCC ' mkdir:created directory ' ccc/xxx '

Linux Commands-mkdir: Creating a Directory

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.