Create Multiple Nested Directories in Linux
Did you know that you can create a complete directory tree with one command?
Let’s start with a simple example:
mkdir -p a/b/c
will create this tree:
`-- a
`-- b
`-- c
And any of these:
mkdir -p a/{b1,b2}/c
or
mkdir -p a/b{1,2}/c
Will create this tree:
`-- a
|-- b1
| `-- c
`-- b2
`-- c
And a little more complicated command:
mkdir -p a/b{1,2,3/c{1,2}}/d
Will create this tree:
`-- a
|-- b1
| `-- d
|-- b2
| `-- d
`-- b3
|-- c1
| `-- d
`-- c2
`-- d
Related posts:
Leave a Reply
About Me
Tags
Bash
Collaboration
Command Line Interface
Courses
Debug
Ebooks
Email
Etiquette
Firefox
Google
Hardware
History
Illusions
Linux
Linux Development
Macros
Manpages
Multimedia
Networks
Object Oriented Programming
Off-Topic
Open Knowledge
Operating Systems
Productivity
Programming
Religion
Science
Security
sed
Sharing
Shell Scripts
Short Posts
Small Code
Social Media
Spam Fighting
Studies
Technology
Terminal
Thoughts
Tools
University
Vim
Web Development
Web Services
Websites
My Twitter
Categories
- Algorithms
- Bash
- BlackBerry
- Collaboration
- Command Line
- Cool Tricks
- Easter Eggs
- Ebooks
- Firefox
- Hardware
- Humor
- Linux
- Linux Development
- Linux Kernel
- Networks
- Open Knowledge
- Other
- Productivity
- Programming
- Science
- Security
- Shell Scripts
- Short Posts
- Thoughts
- Tools
- Vim
- Web Development
- Websites
Popular Posts
Calendar
Archives
- March 2010 (1)
- January 2010 (1)
- December 2009 (2)
- September 2009 (13)
- July 2009 (1)
- June 2009 (6)
- May 2009 (4)
- March 2009 (18)
- February 2009 (10)
- January 2009 (10)
- December 2008 (7)
- November 2008 (8)
- October 2008 (1)
- August 2008 (1)
- July 2008 (1)
- June 2008 (2)

Me @ Social Media