I'm trying to recursively create levels of directories like /folder1/folder2/folder3
/folder1/folder2/folder3
I'm trying mkdir folder1/folder2/folder3, but it doesn't work. How can I do it?
mkdir folder1/folder2/folder3
You should pass the -p parameter to mkdir so it will create all the subfolders. So following your example:
-p
mkdir
mkdir -p folder1/folder2/folder3
2.1m questions
2.1m answers
60 comments
57.0k users