Logo 
Search:

Unix / Linux / Ubuntu Forum

Ask Question   UnAnswered
Home » Forum » Unix / Linux / Ubuntu       RSS Feeds

More frustration finding files

  Date: Feb 12    Category: Unix / Linux / Ubuntu    Views: 460
  

After much grief and frustration, a user here turned me on to "locate" in
terminal, which is still the only way I know of learning the location of a file
whose name is known.

My problem now is 'locate' command uses wildcards by default. I am trying to
find a file whose name (a typo) is "ee". There are hundreds containing this
string. How do I find just one?

Share: 

 

8 Answers Found

 
Answer #1    Answered On: Feb 12    

Just did some testing of the 'locate' command in both Ubuntu 12.04 and
Kubuntu 12.04 - they are *very* different, with the Kubuntu one being
much more flexible !!

What I did find was that in Ubuntu it only looks for files ending in
whatever you search for unless you put a * before and/or after. E.G. I
have a text file with a double ee in the middle of the name.

locate ee.txt finds nothing
locate *ee.txt finds nothing
locate ee*.txt finds nothing
locate *ee*.txt finds it

So if you are finding loads of results do you have many files with
names ending in 'ee' ?

 
Answer #2    Answered On: Feb 12    

No, I am finding 10 zillion files with "ee" anywhere. I am looking for a
directory, actually, which I misnamed due to a typo (It should be "Lee", but it
actual IS ee. Tht is, "dot nothing". I'd also like to be able to find ee.txt if
it existed, and everthing from "aberdeen.doc to zeeland.png

 
Answer #3    Answered On: Feb 12    

With Xubuntu12.04 I'm using "catfish" to find files.

 
Answer #4    Answered On: Feb 12    

Thanks not working for me "find finds nothing at all, not even complete file
names; 'locate gives "fatal error".

 
Answer #5    Answered On: Feb 12    

Locate should never give a 'fatal error'. The worst it should do is
return nothing and put you back to the command prompt again. Even if
you do a *.* search it should just produce a scrolling screen of files
as it lists everything, and if you do get that then [CTRL]+[C] will
stop it.

What happens if you just type locate with nothing for it to search ?
You should get a message that no pattern was specified.

 
Answer #6    Answered On: Feb 12    

I don't think my previous message was clear. I get "fatal error when I use the
locate method within catfish, a file manager that was recommended to me but is
as useless as all the others I have tried.

WHY IS IT COMPLETELY IMPOSSIBLE TO FIND '9.JPG' WITHOUT 500 OTHER FILES WITH '9'
SOMEWHERE IN THEIR NAMES????

 
Answer #7    Answered On: Feb 12    

Please step back from this problem and do something that will help you to
relax - take a walk, drink some tea etc. Once you calm down you will be
able to find satisfying answers. Linux is meant to be fun, it's creator
Linus Torvalds said so!

First Catfish is not a File Manager it is a graphical search utility. If
you type "Catfish Linux" in Google it will come up with several helpful
"how to" articles.

When I need to find a file the tool I use is the filter bar in Dolphin as I
am a Kubuntu user. Dolphin is a file manager with many handy features. You
click on the folder you need to search in the directory tree on the left
and press control-i (thats the letter "i" not number 1). A filter bar
appears at the bottom. Type in the item you are searching for and as each
letter is typed it removes all the files that do not contain that letter.
You do, of course, have to type the letters in the order they appear in
your target word but you could find orange by typing "ange" without the
quotes. The path is shown in the location bar at the top.

I'm curious why you don't know where this file/folder is when you have been
using Ubuntu for only a few weeks. Unless you copied over a lot of files
and folders that you had created somewhere else you won't have many files
in your personal home folder, /home/lee (or whatever you log in with).
Don't show the hidden dot files, and look through Documents and Downloads
etc. You may find the item somewhere in there. If you tried to create a
file or folder outside your home space it may not have been created at all
because only root (administrator) can do that, and you will not be root
when you log in.

Remember that Ubuntu is not the same as whatever you used before. It took a
long time to gain proficiency in that operating system. Ubuntu is not
harder, just different. You can do it.

 
Answer #8    Answered On: Feb 12    

Thank you for your advice. I shall take a step back, since I am not getting
anywhere.

Still it seems to me that it should be possible to explain to a newbie how to
find a file whose name is exactly '9.jpg' without 10,000 other files whose name
contain '9' someplace. EXACTLY '9.jpg'. What directory is it in?

Why isn't this if not easy, at least possible?

 
Didn't find what you were looking for? Find more on More frustration finding files Or get search suggestion and latest updates.




Tagged: