How Do I Make Multiple Directories in Linux?

How Do I Make Multiple Directories in Linux?
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

  1. 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. …
  2. 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

  1. 2) Create multiple directories. We can also create multiple directories at the same time. …
  2. 3) Add directory include its sub-directory. …
  3. 4) Set access privilege. …
  4. 5) Print message for each created directory. …
  5. 6) Create Directory with Date.
Elena Rostova
Author

Elena Rostova

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.