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