Linux Command (1): mkdir, linux Command mkdir

Source: Internet
Author: User

Linux Command (1): mkdir, linux Command mkdir

Function Description:

Mkdir is used to create a new directory or folder with the specified name. An existing directory or folder with the same name cannot be created.

Command Format:

Mkdir [Option] Directory...

Command parameters:

-M, -- mode = mode, set the permission <mode> (similar to chmod), rather than rwxrwxrwx minus umask

-P, -- parents can be a path name. If some directories in the path do not exist, after this option is added, the system will automatically create those directories that do not exist, that is, multiple directories can be created at a time;

-V, -- verbose displays information every time a new directory is created

Command case:

Case 1: Create an empty directory

[Root @ oldboy test] # mkdir kmmiao
[Root @ oldboy test] # ll
Total 4
Drwxr-xr-x 2 root 4096 Aug 7 13:53 kmmiao

Case 2: recursively create a directory

[Root @ oldboy test] # mkdir-p km/miao
[Root @ oldboy test] # ll
Total 8
Drwxr-xr-x 3 root 4096 Aug 7 13:59 km
Drwxr-xr-x 2 root 4096 Aug 7 13:53 kmmiao
[Root @ oldboy test] # cd km
[Root @ oldboy km] # ll
Total 4
Drwxr-xr-x 2 root 4096 Aug 7 :59 miao

Case 3: prompt after creation

[Root @ oldboy km] # mkdir-v test
Mkdir: created directory 'test'
[Root @ oldboy km] #


Where is the mkdir command in linux?

Whereis mkdir
Mkdir: /bin/mkdir/usr/share/man/man1/mkdir.1.gz/usr/share/man/man2/mkdir.2.gz/usr/share/man/man3p/mkdir.3p.gz/usr/share/man /man1p/mkdir.1p.gz
 
In LINUX, create folders, file commands, and clear commands

Create a folder using mkdir path
> 1.txt create an empty file
Del 1.txt Delete Files
Rmdir path: delete an empty 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.