The-p option of mkdir allows you to create multiple levels of directories at once rather than just creating separate directories at a time. For example, to create a directory projects/a/src in the current directory, use the command:
Mkdir-p PROJECT/A/SRC
Instead of:
mkdir Project
CD Project
mkdir ACD amkdir src
Of course, if you have MKCD, you can directly
MKCD PROJECT/A/SRC
In addition, if we want to create a multi-level, multidimensional directory tree, MKCD also looks pale. For example, we want to create directory project, which contains 4 folders A, B, C, D, and these 4 files contain a src folder. Maybe we can create one on one, but I prefer to use a single command, and MkDir's-p option and Shell's parameter extension allow me to do this, such as the following command to complete the task.
Mkdir-p PROJECT/{A,B,C,D}/SRC
Ubuntu "mkdir-p" command