Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What does mkdir mean in linux

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

In this article, the editor introduces in detail "what is mkdir in linux", the content is detailed, the steps are clear, and the details are handled properly. I hope that this article "what is mkdir in linux" can help you solve your doubts.

In linux, mkdir means to create a directory and is an abbreviation for "make directories"; this command is used to create a new directory with the syntax of "mkdir [- mp] directory name"; the setting parameter "- m" is used to manually configure permissions to create directories, and the setting parameter "- p" is used to create all directories recursively.

The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

What does mkdir mean in linux

The mkdir command, which stands for make directories, is used to create a new directory, which is available to all users.

The basic format of the mkdir command is:

[root@localhost ~] # mkdir [- mp] directory name

The-m option is used to manually configure permissions for the created directory instead of using the default permissions.

The-p option recursively creates all directories. Take creating / home/test/demo as an example. By default, you need to create each directory layer by layer, while using the-p option, the system will automatically create / home, / home/test and / home/test/demo for you.

Examples are as follows:

Create a directory.

[root@localhost ~] # mkdir cangls [root@localhost ~] # lsanaconda-ks.cfg cangls install.log install.log.syslog

We create a directory called cangls, which you can see through the ls command that has been created. Note that we use a relative path when creating a directory, so the directory is created under the current directory.

Use the-p option to recursively establish a directory.

[root@localhost ~] # mkdir lm/movie/jp/canglsmkdir: unable to create directory "lm/movie/jp/cangls": there is no such file or directory [root@localhost ~] # mkdir-p lm/movie/jp/cangls [root@localhost ~] # lsanaconda-ks.cfg cangls install.log install.log.syslog lm [root@localhost ~] # ls lm/movie

# only look at the first-level subdirectories here. In fact, subsequent jp directories and cangls directories have been established

After reading this, the article "what does mkdir in linux refer to" has been introduced. If you want to master the knowledge of this article, you still need to practice and use it yourself to understand it. If you want to know more about related articles, welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report