The BASH ‘brace expansion‘ feature can be used to create whole directory trees using a single command.
$ mkdir -p root/{1/{1.1,1.2,1.3},2,3/{3.1,3.2/{3.2.1,3.2.2}}}
$ tree
.
`-- root
|-- 1
| |-- 1.1
| |-- 1.2
| `-- 1.3
|-- 2
`-- 3
|-- 3.1
`-- 3.2
|-- 3.2.1
`-- 3.2.2
Was this post helpful?
Let us know if you liked the post. That’s the only way we can improve.