Home >System Tutorial >LINUX >What does the commonly used Linux command mkdir mean?
The mkdir command in Linux is used to create directories. Options include: -p (create non-existent parent directory), -v (print creation details), -m (set permission mode), and -Z (set SELinux security context). For example, mkdir Documents creates the "Documents" directory, mkdir -p Projects/Team1/ProjectA creates both the "Projects/Team1" and "ProjectA" directories, and mkdir -m 755 Data creates the "Data" directory with "755" permission mode.
Introduction to mkdir command
The mkdir (make directory) command is used in Linux to create a new directory (folder ).
Using syntax
<code>mkdir [选项] 目录名</code>
Options
Example usage
Create a directory named "Documents":
<code>mkdir Documents</code>
Create the parent directory "Projects/Team1" and the directory "ProjectA" at the same time:
<code>mkdir -p Projects/Team1/ProjectA</code>
Create the directory "Data" with the "755" permission mode:
<code>mkdir -m 755 Data</code>
Create directory "tmp" with a specific SELinux security context:
<code>mkdir -Z /tmp</code>
Tip
-p
option. mkdir
The command only creates directories and does not automatically create files. The above is the detailed content of What does the commonly used Linux command mkdir mean?. For more information, please follow other related articles on the PHP Chinese website!