How to create a directory under linux

王林
Release: 2020-06-30 11:53:52
Original
21982 people have browsed it

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

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!

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