The reason locate is so fast is that it has a database. Unfortunately, I
don't believe that database (by default anyway) includes the whole hard
drive. That's why I use find. Locate seemed to miss files that I know were
on the hard drive.

Also, find will use the name only, with the options I gave earlier. So the
command "find / -name core -print" will only list core files to the screen.

Russ

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Lane Lester
Sent: Sunday, March 26, 2000 4:04 AM
To: [EMAIL PROTECTED]
Subject: RE: [expert] find a file


Russ Johnson said:

> find [root of search] [option] regex [option]
>
>  So, to find the file "httpd" do the following:
>
>  First, if you like, try "which httpd". It might be in your path. If that
>  doesn't do anything, then try "find / -name httpd -print". That find
command
>  will search the whole file system for that file.

I like to use "locate" because it's so fast. I wrote a small script that
just
does the following with "lm":
locate $1 | more
because I use that so often. But is there a way to restrict the search for a
precise set of characters (I didn't find it in the man page... at least not
so
I could understand it).

For example, I was looking for "core" files to delete, and locate gave me a
flock of "corel" entries.
--
Lane
____
Lane Lester / Madison County, Georgia USA
Using Linux to get where I want to go...

Reply via email to