Linux The command to create a folder is mkdir, and the syntax is mkdir [option] folder name. Options include: -p recursively creates the parent directory; -v displays the creation process; -m sets permissions; -Z sets the SELinux context. Usage example: mkdir example or mkdir -p /path/to/example.
Linux command to create a new folder
In the Linux system, the command to create a folder is mkdir
(make directory).
Syntax:
<code>mkdir [选项] 文件夹名</code>
Options:
-p
(parents): Recursively create a parent directory that does not exist. -v
(verbose): Display the process of creating a folder. -m
(mode): Set the permissions of the folder. -Z
: Set up the SELinux context. Using:
To create a new folder, enter the following command in the terminal:
<code>mkdir 文件夹名</code>
For example, to create Folder named "example", please run:
<code>mkdir example</code>
If you want to recursively create a parent directory that does not exist, please use the -p
option:
<code>mkdir -p /path/to/example</code>
Other notes:
mkdir
command will not perform any operation. The above is the detailed content of What is the command to create a new folder in Linux?. For more information, please follow other related articles on the PHP Chinese website!