Create new directories and subdirectories in Unix using a single terminal command

It’s funny how programmers get in a "rut", using the same old coding habits and command line syntax for years on end.  I just found that you can create new directories and subdirectories with a single Unix mkdir command using the -p parm.

mkdir -p top_level_directory/child_directory/another_child_directory

And if you’re curious, this won’t work (I tried it):

mkdir -p onemoredir/../anotherdir

Goes to show you that we should follow the same advice we give the junior developers – "check the man page".

Leave a Reply

Related Post

Pocket Legends Archer Build Guide

I found this great game that’s similar to World of Warcraft, is cheap, and playable on my Android mobile device and my PC (plays in the Google Chrome browser). The graphics are great and comparable to World of Warcraft graphics except the world is somewhat limited (imagine World of Warcraft dungeons with walls limiting the area you can travel in). The performance on my Droid Bionic and in the Google Chrome browser is very impressive too.

The Secret in the Bible book puzzle solution

The Secret in the Bible by Tony Bushby has quite a few factual errors and is more of an atheist “push my agenda” type of book rather than a historical review of the subject matter. There was one interesting aspect to the book though. It included a “puzzle” whereby each of the sixteen chapters contained a secret word that when put together in a sentence reveals ancient knowledge so secret, Bushby was not allowed to outright reveal them in his book for fear of some sort of extremely viscous retribution from someone (boy, have I got news for him).

IFTTT Remote trigger system ties all your “services” together

Iftt.com. It stands for (if this then that). It’s basically a “trigger”system that ties into tons of services including RSS, Dropbox, Evernote, Gmail, Youtube, Facebook, Twitter, general email, Flickr, LinkedIn, Last.fm, Read it Later (which I love), Wordpress, etc. It even has triggers for text messages, phone calls, stocks and bonds, and the weather.