Sign up ×
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 Sep 27 '12 at 3:56

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

1 – 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
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 110 down vote accepted
$ mkdir -p foo/bar/zoo/andsoforth
share|improve this answer
FYI the -p stands for "parents" – delinquentme Apr 22 at 17:06

Your Answer


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