How To Make Directory Recursive Command Line Make Directory Recursive mkdir -p

On occasion, like when working with ZendFramework, you may want to build a directory tree.
Did you know you can build a recursive directory tree?
Here’s how:

mkdir normaly works like this:

To build a directory and another directory inside of it you can do the following:

You can even make a grandchild directory.

Use the tree command to see the directory tree.
If you’re on a mac, you can install the tree command with brew.

Then try this:

Leave a Reply

Your email address will not be published. Required fields are marked *