In the Ubuntu system, if you want to create a new folder, how do you create it? Let's take a look at the tutorial on using mkdir to create a folder.
1. First, we open the Ubuntu terminal and use the ls command to check what files and folders are in the current folder, as shown in the figure below
2. Then we use mkdir to create an A folder, as shown in the figure below, just add the folder name directly after the mkdir command
3. Next, we use ls to list the folders and files, as shown in the figure below, the A folder we created is already there
4. If you want tocreate a multi-level folder, as shown in the figure below, you will be prompted that you cannot create it because it did not find the B folder
5. At this time, as long as weadd a p parameter after the multi-level folder, as shown in the figure below, what he means is that if the folder is not found, it will be automatically created
6. Then we use the tree command to check the current folder structure, as shown in the figure below, the multi-level folder we created has been created
7. In summary, When using mkdir to create a folder, you must pay attention to the use of parameter p. It is a very good parameter for creating multi-level folders.
The above is the detailed content of Learn to use the 'mkdir' command in Ubuntu system. For more information, please follow other related articles on the PHP Chinese website!