[lug] Puzzle with find

Matt Thompson thompsma at jilau1.colorado.edu
Thu Jul 7 15:18:22 MDT 2005


On Thu, 2005-07-07 at 15:14 -0600, Michael J. Hammel wrote:
> On Thu, 2005-07-07 at 16:37 -0400, Gordon Golding wrote:
> > I want to find any file whose name contains "install"
> > I do:  find / -name *install*
> 
> locate -r "\/\s*install\s*$"
> 
> This only works for files available the last time the locate database
> was updated.  If you need it to work for current files, just rerun the
> database (which I think is just "locate -u" run as root, but I"m not
> sure about that).

Yep.  Although most scripts (cron, say) you see will use "updatedb"
which is just a link to "locate -u".  slocate is one of those programs I
need on any box I have.  Find is just too slow for big searches.

Next up is beagle, but I think I'll have to get Foresight to use that.
Too much work otherwise.

Matt
-- 
The mayfly lives only one day, and sometimes it rains. - Geo. Carlin
   Matt Thompson -- http://ucsub.colorado.edu/~thompsma/
   440 UCB, Boulder, CO  80309-0440
   JILA A510, 303-492-4662
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3355 bytes
Desc: not available
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20050707/e127c913/attachment.bin>


More information about the LUG mailing list