Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-08-2013, 08:51 PM   #1
LQ Newbie
Registered: May 2013
Posts: 3

Rep: Reputation: Disabled
directory exists but no such directory exists

im trying to make a directory called "proj-07" and when i used the mkdir command it worked. when i ls it doesnt show up and when i try to remove it it says no such file or directory. Then i tried to create it again and it says, "cannot create directory file exists"

im at a loss here
Old 06-09-2013, 12:05 AM   #2
Registered: Mar 2013
Distribution: Redhat, Ubuntu
Posts: 525

Rep: Reputation: 141Reputation: 141
It would be more clear if you copy paste commands you typed actually in terminal and its corresponding output it produced, along with ls of that directory.

Last edited by mddnix; 06-09-2013 at 12:25 AM.
Old 06-09-2013, 12:16 AM   #3
LQ Guru
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
A good trick to learn is to issue the following command as root or using sudo:
It may take a minute or two depending on how much stuff you have on your system. Once the bash prompt return you can then find any file or folder on your system using the locate command (no need for root privileges to use locate.
locate <*the file or folder you're looking for*>
You should run the updatedb command regularly to keep up to date with your system.
1 members found this post helpful.
Old 06-09-2013, 02:02 AM   #4
Senior Member
Registered: Sep 2012
Posts: 1,385

Rep: Reputation: 273Reputation: 273Reputation: 273
Hi and welcome to LQ!
You should give us where your dir is found.
You can use locate or find.

find / -name proj-07 -type d -print 2> /dev/null | xargs ls -ld

Last edited by kooru; 06-09-2013 at 02:07 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to copy a file when destination directory does not exists. abhinav4 Linux - Newbie 6 10-01-2012 10:59 AM
Checking if a directory exists within makefile SexyBachelor Linux - Newbie 3 05-23-2012 04:29 PM
cannot create directory even if file exists pratikvimal Linux - Newbie 7 06-15-2009 03:51 AM
check if directory exists using shell script v333k Programming 9 04-23-2009 09:29 AM
detecting if a directory exists knobby67 Programming 3 10-06-2008 09:48 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:47 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration