+3 votes
in Programming Languages by (40.5k points)

How can I create a hierarchy of directories using a Linux command.

E.g.

For the following directory tree, what command should be used as 'mkdir' does not work.

a/b/c/d

1 Answer

+1 vote
by (346k points)
selected by
 
Best answer

You need to use "-p" option with "mkdir" command to create the nested directory.

$ mkdir -p a/b/c/d


...