223k views
1 vote
Mindy wants to create a new subdirectory at ~/2019projects/projectx/projectplans to start storing the initial project plans for projectx. However, this is the first project she has worked on in 2019 and the 2019projects directory does not exist yet. Which of the following commands will create the higher level directories if they do not already exist?

a. mkdir -r ~/2019projects/project/projectplans
b. mkdir -p ~/2019projects/project/projectplans
c. mkdir --all ~/2019projects/project/projectplans
d. mkdir -v ~/2019projects/project/projectplans

User Paul Dove
by
3.6k points

1 Answer

1 vote

Answer:

b. mkdir -p ~/2019projects/project/projectplans

Step-by-step explanation:

mkdir command in Linux environment is used to create a new directory. This command is used to create a folder to store the information in organized manners.

-p is used to create a parent folder in the directory. If we want to start a new project or want to store information about some new topic we will create a new folder for that purpose. So, -p is used to create a new folder in directory.

In above mentioned case, this is the first project that Mindy started in 2019, so she should create a parent directory of 2019 to save all projects details that she worked in 2019. So she should use -p with mkdir command to make 2019 as a parent folder.

User Medinoc
by
3.5k points