In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
In this issue, the editor will bring you about how to use the Linux system command mkdir. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
Mkdir command is a basic command in Linux system, and its main function is to create directory in Linux system, so mkdir belongs to the built-in command in Linux system.
You can use it by typing mkdir directly in 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
Mkdir verbose
What is Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.
The above is the Linux system command mkdir shared by Xiaobian. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are 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.
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.