In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Most people do not understand the knowledge points of this article, "what is the command for Linux to create a directory?" so the editor summarizes the following, detailed contents, clear steps, and a certain reference value. I hope you can get something after reading this article. Let's take a look at this "what is the command to create a directory in Linux" article.
Use the mkdir command to create a directory that you can use by typing mkdir directly into your console.
Mkdir by default, running the mkdir command without any parameters creates a directory under the current directory. The following is a reference example:
Mkdir command
As you can see from the figure above, we have created a directory called office. When we run the mkdir command, we are in the / home/pungki directory. So the new directory office is created in the / home/pungki directory. If we use an absolute path-for example: / usr/local -, Linux creates a directory under the / usr/local directory.
When Linux discovers that the directory you want to create already exists, Linux prompts us that Linux cannot create it.
Mkdir directory exist
Another first condition for creating a directory is that you must have access to the destination path where you want to create the directory. Mkdir will report this error when you cannot get permission.
Mkdir permission denied
Create multiple directories We can also create multiple directories at the same time. For example, the directories we are going to create are ubuntu, redhat and slackware. Then the grammar would look like this:
$mkdir ubuntu redhat slackware
Create multiple directories
Add a directory containing subdirectories [Note: recursively create directories] when the directory you want to create contains subdirectories, you need to use the-p parameter. If mkdir cannot find the parent directory, this parameter will first help create the parent directory. For example, we want to create a directory called letter, which contains a subdirectory important. Then the grammar would look like this:
$mkdir-p letter/important
Mkdir sub-directory
By setting access permissions using the-m parameter, we can set permissions for the new directory to be generated. Examples are as follows:
The command above $mkdir-letter creates a directory called letter and gives read-only permissions to directory owners, user groups, and other users
Mkdir set privilege
Print the process information for creating a directory. If we want to view the information, we can use the-v parameter to do so. Examples are as follows:
$mkdir-v ubuntu redhat slackware
The above is the content of this article on "what is the command for Linux to create a directory". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please 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: 213
*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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.