How Do I Create a Directory Tree in Linux?
Contents to Create a New Directory with Multiple Subdirectories You Only Need to Type the Following Command at the Prompt and Press Enter (Obviously, Change...
To create a new directory with multiple subdirectories you only need to type the following command at the prompt and press Enter (obviously, change the directory names to what you want). The -p flag tells the mkdir command to create the main directory first if it doesn’t already exist (htg, in our case).
How do I create a directory tree?
Creation of an entire directory tree can be accomplished with the mkdir command, which (as its name suggests) is used to make directories. The -p option tells mkdir to create not only a subdirectory but also any of its parent directories that do not already exist.
Must Read
How do I create a directory structure in Linux?
- The mkdir command in Linux/Unix allows users to create or make new directories. …
- Building a structure with multiple subdirectories using mkdir requires adding the -p option. …
- The mkdir command by default gives rwx permissions for the current user only.