Why is find so slow (Re: Why use find?)

Felix Lee flee at guardian.cs.psu.edu
Wed Oct 10 10:44:54 AEST 1990


>I squirreled away a little program called 'descend' that does the 
>moral equivalent of a 'find . -print', except rather fast.

"descend" is fast because it recognizes leaf directories and avoids
stat()ing the files in that directory.  This is usually a big win,
since most files tend to be in leaf directories.

"find" can't do this in general, since most of its predicates require
stat()ing each file, but it wouldn't be too hard to add lazy stat()ing
to find.  And it may even be worth it.
--
Felix Lee	flee at cs.psu.edu



More information about the Comp.unix.internals mailing list