Xref: utzoo comp.unix.shell:523 comp.unix.internals:564 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!psuvax1!news From: flee@guardian.cs.psu.edu (Felix Lee) Newsgroups: comp.unix.shell,comp.unix.internals Subject: Why is find so slow (Re: Why use find?) Message-ID: Date: 10 Oct 90 00:44:54 GMT References: <1990Sep30.182331.14363@iconsys.uucp> <941@hls0.hls.oz> <1990Oct5.145825.9454@diku.dk> <1990Oct6.055108.14853@smsc.sony.com> Sender: news@cs.psu.edu (Usenet) Organization: Penn State Computer Science Lines: 12 Nntp-Posting-Host: guardian.cs.psu.edu >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@cs.psu.edu