Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is there a linux command that I'm overlooking that makes it possible to do something along the lines of: (pseudo)

$ mkdir -R foo/bar/zoo/andsoforth

Or is there no alternative but to make the directories one at a time?

share|improve this question

migrated from serverfault.com Sep 27 '12 at 3:56

This question came from our site for professional system and network administrators.

1  
linux.die.net/man/1/mkdir –  Zoredache Aug 7 '12 at 20:36
    
funny, I was looking at that page but totally overlooked "parent" because I was thinking of them as children (left to right). –  Dr.Dredel Aug 7 '12 at 20:37
6  
Protip: In some shells you can even do mkdir -p foo/{bar,baz}/zoo/andsoforth. Very useful! –  Aaron Copley Aug 7 '12 at 20:43

1 Answer 1

up vote 33 down vote accepted
$ mkdir -p foo/bar/zoo/andsoforth
share|improve this answer
    
-p... fantastic! –  Dr.Dredel Aug 7 '12 at 20:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.