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 trial

Development Tools Introduction to the Terminal Common Commands Working With Files

Evan Welch
Evan Welch
1,815 Points

What does the -p stand for?

What does the -p stand for?

Thanks!

3 Answers

When you use the mkdir command, you can make a subfolder only one level deep. But with the -p option it lets you make a folder several levels deep. For instance, if you wanted to make the folders sub1/sub2, with the -p you could do:

mkdir -p sub1/sub2

otherwise without the -p you would have to do, mkdir sub1, then cd sub1, then mkdir sub2