Summary: unix find and fastfind on SunOS and/or Solaris

From: Dan Penrod (penrod@whiplash.er.usgs.gov)
Date: Fri Jun 09 1995 - 14:48:46 CDT


Sun Managers did it again. Answered all three questions correctly in less
than 24 hours!

Kudos to Dr. Peter Watkins (peter@jrc.nl) for answering almost immediatly
with the correct answers. I'm going to use his summary (which is brief)
since I could do no better. Peter writes...

>Taking your questions in a completely random order;
>
> + For Solaris 2.x try the GNU version of 'find'. Currently
> at version 3.8 I think. This has the 'locate' function
> which replicates the fastfind feature.
> Try ugle.unit.no:/pub/gnu/find-3.8.tar.gz

Quite so. I grabbed a copy and it's a perfect solution for my solaris
machines that never came with a fast find. Gnu's Great!

> + I suspect that the reason for duplicate names is that
> updatedb is actually a script (try looking at it) which
> descends the filesystem structure. Consequently if you
> specify / and /fred then fred will get searched twice.
> If you look at the updatedb script you will see that
> certain directories can be included/excluded there. Try
> that instead.

Correct again. I was specifically specifying each partition when in
fact the script is smart enough to assume you want everything minus
a few obvious things that no one would want. This was creating
redundancy which accounts for files being reported twice.

> + Your problem of updatedb not working at all seems a bit
> odd. I suggest you first try;
> /usr/lib/find/updatedb / /usr /nat1 /nat2
> by hand without chucking the output. Possibly the 'find'
> command is not where updatedb expects - look at the
> updatedb script again.

And so I did. It almost immediatly blew up complaining about a lack
of /tmp space. I cheated by changing the script to use a tmp space
out on a data disk. Now it works like a champ. First time in years!

My thanks to Dr. Peter Watkins as well as the other 9 respondees who
wrote later. Most were not able to answer all three questions but
everyone had something interesting to share with me. To see what...
(or if you're one of the other 9 respondees and want to see your name
in print)... credits and micro-summaries below...

-drp

 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| _/ _/ _/_/_/_/ _/_/_/ _/_/_/_/ | Dan Penrod - Unix Administrator |
| _/ _/ _/ _/ _/ | USGS Center for Coastal Geology |
| _/ _/ _/_/_/_/ _/ _/_/ _/_/_/_/ | St. Petersburg, FL 33701 |
| _/ _/ _/ _/ _/ _/ | (813)893-3100 ext.3043 |
|_/_/_/_/ _/_/_/_/ _/_/_/_/ _/_/_/_/ | penrod@whiplash.er.usgs.gov |
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Thanks to:
peter@jrc.nl (Peter Watkins)
ddj@gradient.com (Dave Johnson) who offered... Get gnu find?
                        in the directory ftp://prep.ai.mit.edu/pub/gnu is
                        the latest version: ...findutils-4.1.tar.gz
sdr@rdga3.att.com (S. D. Raffensberger 500622500 (RD)) who pointed out to
                        me that updatedb was simply an sh script. Here I
                        was assuming it was a binary.
raoul@MIT.EDU (Nico Garcia) who points out that its best to use updatedb
                        without parameters and also refers me to gnu version
                        at the MIT FTP site.
murff@nicimg.com (Jim Murff) who also refers me to gnu version at MIT
lilga@srv630.Ando.Com (Dave Lilga) who points out that he had modified his
                        updatedb and that there should be a "sort -u" and/or
                        "uniq -c" to eliminate duplicates.. Also refers me
                        to gnu.
Tom Mornini <tmornini@parallaxinc.com> ..."You can install GNUs find
                        available from prep.ai.mit.edu. It installs
                        easily and works perfectly." Yes, thanks, so I've
                        heard. :-)
seanw@amgen.com (Sean Ward) suggesting... use gnu and/or copy over the SunOS
                        updatedb code to my solaris box.
Ray Brownrigg <Ray.Brownrigg@isor.vuw.ac.nz> who also suggests copying the
                        SunOS version over.
hadm@syst.oregonian.com (Thad Macmillan) who points out that I'm getting
                        redundant answers because /usr is a child of / so
                        things in /usr show up twice. Find is based on
                        subdirectories not partitions. Good to keep in mind.
"Christopher A. Stewart" <allan@mazama.com> who brings up anothe point...
                        "Fastfind is considered a security hole on a lot of
                        sites. And many don't use it. The reason it's a hole,
                        is the data base is built as root so it sees every
                        file, and will report the names of files to any
                        user that another user is trying to protect."
Ric Anderson <ric@seagull.rtd.com> who points out that fast find is not to be
                        found in Solaris because Sun is politically trying to
                        be posix compliant which requires 'find' to behave
                        differently.



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:26 CDT