Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialChristine Martino
16,837 PointsIf the -r flag stands for "recursive", what does the -p flag in mkdir -p actually stand for?
Knowing the meaning behind certain shorthand command names just helps me remember what they do, and I hear it called out in the video. :)
1 Answer
Ken Alger
Treehouse TeacherChristine;
Great question!
The -p
flag creates parent directories as needed. Here's an example:
Create both a parent directory called
treehouse
and it's child directory calledcourses
at the same time. Assume that directorytreehouse
will branch-off your home directory and that you are in your home directory to start. Use a relative pathname.
You would want to use the -p
flag here. The syntax would be:
mkdir -p treehouse/courses
That assumes that you are already in your home directory and have write permissions in that directory.
Hope that helps, post back with additional questions.
Ken
Christine Martino
16,837 PointsChristine Martino
16,837 PointsSweet! Thanks for the super-quick answer! You guys rock!!