Contents
How to Create Multiple Directories with mkdir. You can create directories one by one with mkdir, but this can be time-consuming. To avoid that, you can run a single mkdir command to create multiple directories at once. To do so, use the curly brackets {} with mkdir and state the directory names, separated by a comma.
How do you create multiple directories in UNIX?
How to Create Multiple Subdirectories with One Linux Command
- If you want to create a directory containing several subdirectories, or a directory tree, using the command line in Linux, generally you have to use the mkdir command several times. …
- This can all be combined into one command, and we’ll show you how.
How do you create 5 directories in Linux?
How to Create Directory in Linux using mkdir Command
- 2) Create multiple directories. We can also create multiple directories at the same time. …
- 3) Add directory include its sub-directory. …
- 4) Set access privilege. …
- 5) Print message for each created directory. …
- 6) Create Directory with Date.