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?
Suggested Answer: C
Get Premium LCP-001 Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
-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.
12 comments · newest first
ER
Erasmo
2 months ago
I was torn between C and B, but C is definitely the right choice.
DU
Dulce
2 months ago
Agreed, C makes sense. It creates parent directories too.
LA
Lavonda
2 months ago
I think it's C. The -p option is perfect for this.
MA
Mary
3 months ago
Just learned this, pretty cool!
SH
Sherman
3 months ago
I thought -R was for recursive too?
LI
Lizbeth
3 months ago
Wait, are we sure about that?
EA
Earleen
3 months ago
Agreed, -p is the way to go.
AR
Arminda
3 months ago
It's C) mkdir -p for sure!
KA
Katie
3 months ago
I vaguely recall that -P is not a standard option, so I think that rules out D.
TI
Tiffiny
4 months ago
I'm not sure about the flags, but I feel like -r is for recursive and might not work here.
KI
Kiera
4 months 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.
RA
Raylene
4 months 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.