PrepAway - Latest Free Exam Questions & Answers

What command will create all of the needed directories in one step?

You need to create a simple hierarchy of directories: images/photos/summer/ottawa/
None of the directories on that path exists. What command will create all of the needed directories in one step?

PrepAway - Latest Free Exam Questions & Answers

A.
mkdir -r images/photos/summer/ottawa/

B.
mkdir -R images/photos/summer/ottawa/

C.
mkdir -p images/photos/summer/ottawa/

D.
mkdir -P images/photos/summer/ottawa/

E.
mkdir -m images/photos/summer/ottawa/

Explanation:
From the man pages:
mkdir – make directories
-p, –parents make parent directories as needed

2 Comments on “What command will create all of the needed directories in one step?

  1. kavyashree says:

    I think Answer is D. mkdir -P images/photos/summer/Ottawa/. Very firstly we need to create a parent directory and keep all these sub directories in it.




    0



    0

Leave a Reply