yv9caa
Last Updated: December 26, 2018
·
5.196K
· jmarizgit

Unix create multiple files under directories

Here is how you create multiple sub directories:

$ mkdir -p project/{images,pages}

The p option is to also create the "public" directory.

Using a similar syntax as the above you can also create files under directories:

$ touch project/{index.html,pages/pages.html,pages/new.html}

This is the structure of your folder project now:

project/
    - index.html
    images/
    pages/
        - index.html
        - new.html

Happy Hacking!