Can you create multiple parent directories at once?

QuestionsQuestions8 SkillsProDec, 17 2025
0116

Yes, you absolutely can create multiple parent directories at once using the mkdir command combined with the -p (parents) option!

As I explained before, mkdir -p allows you to specify a path, and it will create any missing intermediate directories along that path.

For example, if you wanted to create a structure like level1/level2/level3 and none of those directories existed, you would use:

mkdir -p level1/level2/level3

This single command would create level1, then level2 inside level1, and finally level3 inside level2.

Feel free to try it out if you want to see it in action!

0 Comments

no data
Be the first to share your comment!