*BSD News Article 9833


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA6612 ; Mon, 11 Jan 93 15:34:09 EST
Path: sserve!manuel.anu.edu.au!munnari.oz.au!sgiblab!spool.mu.edu!olivea!isc-br!frigg!carlp
From: carlp@frigg.isc-br.com (Carl Paukstis)
Newsgroups: comp.unix.bsd
Subject: Re: Locate/fast-find (Was: Re: Shared lib X for 386bsd?)
Message-ID: <carlp.726981966@frigg>
Date: 14 Jan 93 03:26:06 GMT
References: <1993Jan8.050552.11116@ntuix.ntu.ac.sg> <fXOtCvR@quack.sac.ca.us> <15847@lupine.ncd.com>
Sender: news@isc-br.isc-br.com (news user)
Organization: ISC-Bunker Ramo, An Olivetti Company
Lines: 32
Nntp-Posting-Host: frigg.isc-br.com

aledm@grant.ncd.com (Aled Morris) writes:

>In article <fXOtCvR@quack.sac.ca.us>, dfox@quack.sac.ca.us (David Fox) writes:
>> >Anyway, rather than asking the net where a file in my own filessytem
>> >is I'd run a brute force 'find / -print | grep xterm'. :-)
>>
>> In article <EWERLID.93Jan8222423@ida.docs.uu.se> you write:
>> Actually, the '-print' is superflous, just ' find . | grep xterm' should
>> work.  And, that's pretty fast in finding files, too.

>Emm...isn't `find / -name xterm -print' simpler?
>Or `find / -name \*xerm\* -print'?

I grew up on SYSV, so it took me by surprise that -print isn't
required.  I didn't believe it until this message caused me to telnet to
ref.tfs.com and try it.  Something new every day...

Anyhow - on both my home BSD system and some heavily-used SYSV development
systems I administer here at work, I run a little cron task every
night that does a "find / -print >/ALLfiles".  I've aliased "locate" to
a bash function that greps /ALLfiles.  It ain't up-to-the-minute, but
it beats fumbling around and waiting for interactive "find" sessions.

The only disadvantage is that it's a pretty big file (couple of
megabytes at times), I find it to be worth it.

If somebody already suggested this, pardon me.  I haven't followed the thread.
--
Carl Paukstis, RRR&RSG                | "If we were directed from Washington 
 Olivetti North America / Spokane, WA |  when to sow and when to reap, we would 
 Mail: carlp@mail.spk.olivetti.com    |  soon want for bread."
   or: ...uunet!oliveb!isc-br!carlp   |     - Thomas Jefferson