Wednesday, May 30, 2012

How To create directories folders recursively in linux?

We all know about the mkdir command in linux that lets us creates directories.

But we will end up having many occassions where we will have to create directories or folders deeply nested.

Say we want to create /directory_1/directory_2/directory_3 where none of the directories are existing. How do we do it?

Simple...Just add -p option.

$ mkdir -p /directory_1/directory_2/directory_3





No comments:

Post a Comment