Linux command--mkdir

Source: Internet
Author: User

mkdir command to create one or more directories at a time

Basic usage Syntax:

mkdir Directory Name
[Email protected]:~/eth10/eth10# mkdir test[email protected]:~/eth10/eth10# lstest[email protected]:~/eth10/eth10#
[Email protected]:~/eth10/eth10# mkdir test1 test2[email protected]:~/eth10/eth10# lstest test1 test2[email protected]: ~/eth10/eth10#


Alternatively we can use-p to recursively create the directory

[Email protected]:~/eth10/eth10# mkdir-p test/test1/test2[email protected]:~/eth10/eth10# find/root/eth10/eth10/- Type D-name test2-print/root/eth10/eth10/test/test1/test2[email protected]:~/eth10/eth10#


Second, if we need to create a directory and set permissions at the same time, we can use-m to create

[Email protected]:~/eth10/eth10# mkdir-m 777 Test1[email protected]:~/eth10/eth10# ls-al Total usage 8drwxr-xr-x 3 root root 4096 August 10:33 testdrwxrwxrwx 2 root root 4096 August 10:39 test1


This article is from the "eth10" blog, make sure to keep this source http://eth10.blog.51cto.com/13143704/1957002

Linux command--mkdir

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.