Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

GAQM LCP-001 Exam - Topic 2 Question 106 Discussion

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?
C) mkdir -p images/photos/summer/ottawa/
A) mkdir -r images/photos/summer/ottawa/
B) mkdir -R images/photos/summer/ottawa/
D) mkdir -P images/photos/summer/ottawa/
E) mkdir -m images/photos/summer/ottawa/

GAQM LCP-001 Exam - Topic 2 Question 106 Discussion

Actual exam question for GAQM's LCP-001 exam
Question #: 106
Topic #: 2
[All LCP-001 Questions]

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?

Show Suggested Answer Hide Answer
Suggested Answer: C

-p options means no error if existing, make parent directories as needed. It will creates the directory images/photos/summer/Ottawa. Where images is the parent directory of photos, photos is the parent directory of summer etc.


Contribute your Thoughts:

0/2000 characters
Sherman
3 days ago
I thought -R was for recursive too?
upvoted 0 times
...
Lizbeth
8 days ago
Wait, are we sure about that?
upvoted 0 times
...
Earleen
13 days ago
Agreed, -p is the way to go.
upvoted 0 times
...
Arminda
18 days ago
It's C) mkdir -p for sure!
upvoted 0 times
...
Katie
24 days ago
I vaguely recall that -P is not a standard option, so I think that rules out D.
upvoted 0 times
...
Tiffiny
29 days ago
I'm not sure about the flags, but I feel like -r is for recursive and might not work here.
upvoted 0 times
...
Kiera
1 month ago
I remember practicing a similar question, and I think the correct option is C) mkdir -p, since it creates the entire path at once.
upvoted 0 times
...
Raylene
1 month ago
I think the command we need is the one that allows creating parent directories, but I can't remember if it's -p or -R.
upvoted 0 times
...

Save Cancel