Home  >  Article  >  Operation and Maintenance  >  How to create a directory under linux

How to create a directory under linux

王林
王林Original
2020-06-22 15:33:0621903browse

The method to create a directory under Linux is: you can use the mkdir command to create it. The syntax of the mkdir command: [mkdir [-p] dirName], the parameter p means to determine whether the directory exists, and create it if it does not exist. Specific usage: [mkdir /usr/test].

How to create a directory under linux

The method to create a directory under Linux is: You can use the mkdir command.

(Recommended learning: linux tutorial)

mkdir syntax

mkdir [-p] dirName

Parameter description:

- p: Make sure the directory name exists. If it does not exist, create one.

Example:

Create a test directory in the /urs/ directory.

Enter the command: mkdir /usr/test, and the creation will be successful.

How to create a directory under linux

Example:

Create a subdirectory under the non-stub directory.

Create a test1_1 directory in the /urs/test1/ directory. /urs/test1 does not exist.

Enter the command: mkdir -p /usr/test1/test1_1, and the creation will be successful.

How to create a directory under linux

The above is the detailed content of How to create a directory under linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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