Linux - NewbieThis 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!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm not all that new to linux, but this is one I just can't seem to figure out. I've the man pages (man -k find, locate) but I can't seem to find anything. Doesn't seem to be any place intuitive in Gnome. I just need to know where some files are located.
Mind you if you can't find anything and you're very sure it should be there, try updating the database of your searchtool.
(in case of locate do 'updatedb')
It happened to me that I couldn't find a thing even though I was sure I had just installed it.
I usually use: find ./ -name "filename"
If there are lots of entries (such as when filename is *.mp3), then piping to less or grepping to refine the search works well.
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304
Rep:
find . -name filetosearchfor* -print
starts searching in the current directory through
all the subdirectories for the filenameyou specify.
I put the asterick in to show you can use wildcards.
its
find then where you want to start searching from
then what you want to search for
then what you want to do with the results.
locate uses a database that it makes and is much faster,
but may not be current. often locate updates its
database as a cron job in the background.
grep is for searching for text in a file or files
grep -r poo *
searches for poo all files in the current directory
and below.
you could go into your mozilla cache or cookies
and see if your credit card number was stored
anywhere there
grep -r 1234123412341234 *
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.