I want to create this folder: $HOME/a/b/c/d
while $HOME/a
has not yet been created! Is it possible with one line in Terminal?
I want to create this folder: $HOME/a/b/c/d
while $HOME/a
has not yet been created! Is it possible with one line in Terminal?
You can use the command
mkdir
with-p
option to create a folder inside another non-existent folder. Consider an example,Where the folders
a
,b
,c
andd
do not exist in home before running the command. After execution of the command all these folders will be created recursively inside one another.You can see from
man mkdir
Here is the answer to the question,below command will do the job you want in just the way you want :) This can be done with mkdir (make directory command) as shown below:
If you want it to show you the directories it created while it is working then use verbose with it as shown below:
Enjoy!! :)