« 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 | 261 Comments »

October 22nd, 2025 at 21:02
Amazing a lot of wonderful material.
October 22nd, 2025 at 22:26
I relish, cause I found exactly what I used to be taking a look
for. You’ve ended my 4 day long hunt! God Bless you man. Have a great day.
Bye
October 25th, 2025 at 09:38
I really like reading an article that can make people think.
Also, thanks for permitting me to comment!
October 25th, 2025 at 09:48
Excellent blog here! Also your site loads up fast! What host
are you using? Can I get your affiliate link to your host?
I wish my web site loaded up as quickly as yours lol
October 25th, 2025 at 10:59
Heya i’m for the first time here. I came across this board and I find It truly useful & it helped me out much.
I hope to give something back and aid others like you helped
me.
October 25th, 2025 at 13:28
Thank you for the good writeup. It in fact was a amusement account it.
Look advanced to more added agreeable from you!
By the way, how can we communicate?
Feel free to surf to my page – Brittny
October 28th, 2025 at 15:31
Howdy would you mind letting me know which
webhost you’re using? I’ve loaded your blog in 3 different internet browsers and I must
say this blog loads a lot quicker then most. Can you recommend
a good web hosting provider at a reasonable price?
Thanks, I appreciate it!
October 28th, 2025 at 15:33
I think that everything said was very logical. However, what about this?
suppose you typed a catchier title? I mean, I don’t wish to
tell you how to run your website, but what if you added a post title that makes people want more?
I mean How to force mkdir to create a directory if there isn’t already
one at Compdigitec Labs is a little vanilla. You could peek at Yahoo’s
home page and see how they write article headlines to grab people
to open the links. You might add a related video or a related pic or two to
grab people excited about what you’ve got to
say. Just my opinion, it would make your blog a little bit more interesting.
October 30th, 2025 at 22:15
Appreciate the recommendation. Let me try it out.
Also visit my website High-quality replica designer bags
November 1st, 2025 at 13:34
I know this web page offers quality dependent articles and additional
data, is there any other website which presents such things in quality?
November 1st, 2025 at 13:46
Good answers in return of this issue with firm arguments and explaining the whole thing concerning that.