PDA

View Full Version : [ubuntu] Mkdir: cannot create directory



Thresholder
July 24th, 2012, 06:56 PM
Hello,


I have really minimal knowledge of Linux so bear with me please.


I was trying to install vnc in ubuntu server 12.04 following this guide
http://bit.ly/Ol5vC5.



I think I didn't exit root as instructed and now I get the following error:
mkdir: cannot create directory `.vnc': File exists


My problem is similar to this http://bit.ly/NTMSVc


I tried some of the suggestions in my last link to no avail so I am basically stuck.

Any help much appreciated.

Thank you.

Vegan
July 24th, 2012, 06:58 PM
try


su mkdir dirname

:guitar:

MadCow108
July 24th, 2012, 07:03 PM
it gives the error when you follow the instructions part "mkdir .vnc"?

just ignore the failure, mkdir creates a folder, if it already exists there is nothing to do.
mkdir -p is often preferable as it recursively creates folders and ignores failures due to it already existing
don't create it with su, that will likely just cause permission issues.

cortman
July 24th, 2012, 07:11 PM
try


su mkdir dirname

:guitar:

That's not going to work- it'll just try to su to a user called "mkdir". Try either of these-


sudo mkdir dirname
su -c mkdir dirname

Thresholder
July 29th, 2012, 10:58 PM
Hello guys,

Sorry for not getting back earlier and thanks to each one of you who replied.

A friend helped me out in the end so not sure how he fixed it but I have taken note of all your suggestions for future reference.

Many thanks. :)