Make Multiple Directories with Sub-Directories

suggest change
mkdir -p toplevel/sublevel_{01..09}/{child1,child2,child3}

This will create a top level folder called toplevel, nine folders inside of toplevel named sublevel_01, sublevel_02, etc. Then inside of those sublevels: child1, child2, child3 folders, giving you:

toplevel/sublevel_01/child1
toplevel/sublevel_01/child2
toplevel/sublevel_01/child3
toplevel/sublevel_02/child1

and so on. I find this very useful for creating multiple folders and sub folders for my specific purposes, with one bash command. Substitute variables to help automate/parse information given to the script.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents