What is the command to create a folder in linux

coldplay.xixi
Release: 2021-01-22 16:12:47
Original
38735 people have browsed it

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.

What is the command to create a folder in linux

#The operating environment of this article: linux2.6.32 system, DELL G3 computer.

Linuxmkdir Create folder command

Syntax

mkdir (选项)(参数)
Copy after login

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

目录:指定要创建的目录列表,多个目录之间用空格隔开。
Copy after login

Common examples

1. Create multiple folders under the current folder

What is the command to create a folder in linux

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)

What is the command to create a folder in linux

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
Copy after login

What is the command to create a folder in linux

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
Copy after login

What is the command to create a folder in linux

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!