The Linux folder creation command is mkdir, and the syntax is [mkdir (option) (parameter)], where Z is to set the security context, which is valid when using SELinux, and version displays version information.
#The operating environment of this article: linux2.6.32 system, DELL G3 computer.
Linuxmkdir
Create folder command
Syntax
mkdir (选项)(参数)
Options
-Z: Set the security context, effective when using SELinux;
-m
or --mode set the directory while creating the directory Permissions; -p or --parents If the upper-level directory of the directory to be created has not yet been created, the upper-level directory will be created together;
--version displays version information.
Parameters
目录:指定要创建的目录列表,多个目录之间用空格隔开。
Common examples
1. Create multiple folders under the current folder
2. Specify the absolute path to create the xxx folder, and at the same time create the vvv folder with the current path (by analogy, you can also create folders with multiple absolute paths at the same time)
3. Create a subdirectory test under the directory /qwd, and only the file owner has read, write and execution permissions, and others do not have permission to access
mkdir -m 700 /qwd/test
4. Create in the current directory /qxc and the ttt directory under qxc, the permissions are set to the file owner can read, write and execute, the same group of users can read and execute, other users have no permission to access
mkdir -p -m 750 qxc/ttt
Related learning recommendations: linux video tutorial
The above is the detailed content of What is the command to create a folder in linux. For more information, please follow other related articles on the PHP Chinese website!