2

Is there a way of doing this at the terminal? i.e. without writing a script, e.g.

mkdir subject{1,2,3,4}/book{1,2,3}

why doesnt the preceeding work with or without the -p option?

2 Answers 2

3

You can do it with following command:

mkdir -p Subject{1..4}/Book{1..3}
0

I tried the following command and it worked:

mkdir mainfolder/{folder1/{subfolder,subfolder,subfolder},folder2/{subfolder,subfolder}}

That creates a "mainfolder" which contains two folder(folder1 and folder2) and their respective subfolders.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .