"Linux learning is not difficult" file/directory Management (6): mkdir command to create a directory

Source: Internet
Author: User

7.6 "Linux learning is not difficult" file/directory Management (6): mkdir command to create a directory

Use the mkdir command to create a directory on a Linux system.
Command syntax:

mkdir [Options] [contents]

The meanings of the options in the command are as shown in the table.

Options

option meaning

-m < permissions mode >

set permissions on the newly created directory, when the-m option is not available, the default permission is 755

-P

can be a path name. At this point, if some directories in the path do not already exist, and with this option, the system will automatically create directories that do not already exist, that is, multiple directories can be established at one time


Example: Create a directory Newdir1 with default permissions of 755.

[Email protected] ~]# mkdir Newdir1

Example: Create a directory Newdir2 with permissions of 777.

[Email protected] ~]# mkdir-m 777 Newdir2


This article extracts from "Linux Learning is not difficult" textbook, which is one of the most practical, theoretical and practical Linux Introductory materials. To read the entire book, visit the Linux ops (www.linuxywz.com) website .



"Linux learning is not difficult" file/directory Management (6): mkdir command to create 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.