Mkdir -- command,
MkdirCommand
Mkdir: the abbreviation of make directory (ies), used to create a directory
1. Syntax
Mkdir [OPTION]... DIRECTORY
Note: Option is a selection, optional, and directory is the name of the directory to be created
2. Options
3. Parameters
Directory: Specify the directory to be created. multiple directories are separated by spaces.
4. Instances
[Root @ oldboy/] # mkdir oldboy#Create the oldboy directory under the root/directory
[Root @ oldboy/] # mkdir oldboy#If a directory already exists, you cannot create a directory.
Mkdir: Unable to create directory "oldboy": The file already exists
[Root @ oldboy/] # mkdir-p oldboy/test/geng#-PThe parameter is used to create a directory recursively. If the file exists, it will not be treated as an error. If the file does not exist, the directory will be created layer by layer.
-V parameter to display the Directory creation process:
[Root @ oldboy/] # mkdir-p oldboy/a/B/c-v#-VParameters are used to display the Directory creation process.
Mkdir: the directory "oldboy/a" has been created"#First create directory
Mkdir: the directory "oldboy/a/B" has been created"#Create directory B
Mkdir: the directory "oldboy/a/B/c" has been created"#Create directory c
Remarks: The-p parameter is commonly used to create a directory recursively. If a directory exists, no errors will occur. The-v parameter shows the Directory creation process, which is not commonly used. Beginners can check the Directory creation process, it is easy to understand how the-p parameter is recursively created.