Create multiple sibling directories using bash mkdir

Written by James McDonald

January 4, 2013

I wanted a directory structure of



So I was wondering how you create multiple directories on one level without doing it across multiple commands.

To do it in one line:

mkdir -p /u5/db/{prod,test}


Submit a Comment

Your email address will not be published.

You May Also Like…


Zebra Printer Language The above website has a page where you can enter ZPL and it...

PHP Iterators

Just came across a Youtube talk "Iterators in PHP" by Jake Smith published in 2014 that steps through the many...

PHP array_map Multiple Arrays

array_map can take multiple arrays. I like how it starts mapping through them starting at the first element of each...