N
N
Nicholas2016-05-14 15:55:34
linux
Nicholas, 2016-05-14 15:55:34

How to create a directory with many subdirectories in ssh with one command?

Example:
you need to create a test folder
mkdir /var/node/bla-1/bla-2/bla-3/test
and you need to create the bla-1/bla-2/bla-3 folders if they don't exist!
through mkdir I get an error, which is logical)
mkdir: cannot create directory `/var/node/bla-1/bla-2/bla-3/test': No such file or directoryс
Maybe there are options?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Kuts, 2016-05-14
@ACCNCC

Here's an example - creating a directory with a hundred subdirectories:
PS Describe the task more precisely at once. For your specific case:
mkdir -p /var/node/bla-1/bla-2/bla-3/test

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question