[Code Example] Create multiple nested directories ubuntu windows


In this article we will provide you the code for creating multiple nested directories on ubuntu, windows, macos and other linux or unix based operating systems. on windows, we can use WSL.

Use mkdir -p directory_structure to create your nested directories.

Code Example –

[email protected]:~/Desktop$ mkdir -p marvel/superhero/tony/ironman justice/superhero/kalel/superman marvel/superhero/bruce/hulk

This command will create multiple root directories as well as child folders on Desktop. The folder structure will look like this –

- Desktop
|- marvel
|  |_ superhero
|     |- tony
|     |  |_ ironman
|     |_ bruce
|        |_ hulk
|_ justice
   |_ superhero
      |_ kalel
         |_ superman
creating multiple nested directories using mkdir -p terminal command in ubuntu, windows wsl

Sign Up for Our Newsletters

Get only the best articles delivered to your mail

You May Also Like

[Code Example] K Lists In Java

Table of Contents Hide IntroductionLet’s Dive In;klist CommandsCode ExampleResultsRelated Posts: Introduction K-list method displays the entries in the local credentials cache and key table in the command line of the…
View Post