Thursday, December 3, 2009

How to create Recursive Directories?

Here is a trick to create recursive directories

linux > mkdir -p root/subdir1/subdir2/subdir3/

This will create a given directory hierarchy in present working directory(PWD). If you are bored to type "mkdir -p" every time. Add the following in your .bash_profile in home directory.

alias mkdir="mkdir -p"

No comments:

Post a Comment