« 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 | 275 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.
November 8th, 2025 at 10:57
Hello Dear, are you in fact visiting this website regularly, if so afterward you will absolutely take pleasant experience.
November 8th, 2025 at 11:04
I was able to find good advice from your content.
November 8th, 2025 at 11:15
I got this web page from my buddy who told me on the topic of this site and at the moment this time
I am visiting this web site and reading very
informative content at this time.
November 8th, 2025 at 11:25
The other day, while I was at work, my sister stole my iphone and tested to
see if it can survive a forty foot drop, just so she can be a youtube
sensation. My iPad is now broken and she has 83 views. I know this is completely off topic but I had
to share it with someone!
November 8th, 2025 at 11:41
Good day I am so grateful I found your blog, I really found you by error, while I was looking on Askjeeve for something else, Regardless I am here now and would just like to say thank you for a incredible post and a all round
exciting blog (I also love the theme/design), I don’t have time to go through it
all at the moment but I have saved it and also added your RSS feeds, so
when I have time I will be back to read a great deal more,
Please do keep up the fantastic work.
November 8th, 2025 at 11:44
Hi! Someone in my Myspace group shared this site with us so I
came to look it over. I’m definitely loving the information.
I’m bookmarking and will be tweeting this to my followers!
Outstanding blog and outstanding design.
November 8th, 2025 at 13:49
Hello are using WordPress for your site platform?
I’m new to the blog world but I’m trying to get started and create my
own. Do you need any html coding expertise to make your own blog?
Any help would be really appreciated!
November 8th, 2025 at 13:56
This site truly has all the information I wanted about this subject and didn’t know
who to ask.
November 8th, 2025 at 14:03
It’s really very difficult in this full of activity life to listen news on TV, thus I only use
internet for that purpose, and get the newest information.
November 8th, 2025 at 14:26
Oh my goodness! Incredible article dude! Many thanks, However I am
encountering troubles with your RSS. I don’t understand why I cannot join it.
Is there anybody having identical RSS issues? Anybody
who knows the solution can you kindly respond? Thanks!!
November 8th, 2025 at 14:50
Very nice post. I definitely appreciate this website.
Stick with it!
November 8th, 2025 at 15:25
I do not even know how I ended up here, but I thought this
post was great. I do not know who you are but definitely you are going to a famous blogger if you are
not already 😉 Cheers!
November 8th, 2025 at 15:33
Howdy! This post couldn’t be written any better!
Reading this post reminds me of my good old room mate!
He always kept chatting about this. I will forward this page to him.
Pretty sure he will have a good read. Many thanks for
sharing!
November 8th, 2025 at 17:25
I don’t even understand how I finished up right here,
however I assumed this put up was once great.
I do not know who you’re however certainly you’re going to a well-known blogger
if you happen to aren’t already. Cheers!