« 12 things you need to know about PHP | Home | How to get the initial help on sudo to reappear in Ubuntu »
How to force mkdir to create a directory if there isn’t already one
By admin | September 3, 2008
If you’ve ever tried to make a directory if there isn’t one existing, you probably have bumped into the following error:
mkdir: cannot create directory `the_directory': File exists
To fix this, use this instead to suppress error and create parent directories if needed:
mkdir -p your_directory
For more information, see the mkdir page at Wikipedia.
If you found this article helpful or interesting, please help Compdigitec spread the word. Don’t forget to subscribe to Compdigitec Labs for more useful and interesting articles!
Topics: Linux | 401 Comments »

March 10th, 2026 at 17:44
Link exchange is nothing else except it is just placing the other person’s web site link on your page at appropriate place and other person will also do same in support of you.