Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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?


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

Lisa Walters
Lisa Walters
Front End Web Development Techdegree Student 11,336 Points

Hello! You find out in a later video that -p literally stands for "parent", which allows you to make a directory comprised of many subfolders.