Use the mkdir command to create a new folder in Linux. The syntax is: mkdir [option] folder name. Options include: -p to create a parent directory, -v to display details, and -m to set permissions. Examples: mkdir Documents, mkdir -m 755 Temp, mkdir -p Downloads/Projects. Related commands: rmdir deletes empty folders, rm -r deletes folders and their contents, mv moves or renames folders.
Common commands for creating new folders in Linux
Common commands for creating new folders in the command line terminal It's mkdir
.
Syntax:
<code>mkdir [选项] 文件夹名称</code>
Options:
-p
: If the parent directory If it doesn't exist, create it first. -v
: Display the detailed process of execution. -m
: Set file mode or permissions. Example:
<code>mkdir Documents</code>
<code>mkdir -m 755 Temp</code>
<code>mkdir -p Downloads/Projects</code>
Related commands:
rmdir
: Delete empty folders. rm -r
: Delete the folder and all its contents. mv
: Move or rename the folder. The above is the detailed content of What are the common commands to create a new folder in Linux?. For more information, please follow other related articles on the PHP Chinese website!