Why use find?

Wm E. Davidsen Jr davidsen at sixhub.UUCP
Tue Oct 9 09:48:24 AEST 1990


In article <1990Oct7.001518.14216 at diku.dk> kimcm at diku.dk (Kim Christian Madsen) writes:
>cpcahil at virtech.uucp (Conor P. Cahill) writes:
>Maybe not on your system, but on my system (a SYSV) system, find perfoms
>a getpwd(3C) each time it enters a directory, and getpwd(3) is by
>standard implemented by forking a shell to do a pwd(1) in oorder to
>get the result ... This makes it slow.

  What?? There may be such an implementation somewhere, but I can't
imagine why anyone would do that. Find doesn't need to use an absolute
pathname, it has the starting name on the command line, and if it needed
this info it would only need to do it at most once and keep track of it
from there on.

  Moreover running find on a large directory shows no such info in the
accounting file.

  I guess I'm saying that I doubt that this is (a) needed or (b)
generally true.
-- 
bill davidsen - davidsen at sixhub.uucp (uunet!crdgw1!sixhub!davidsen)
    sysop *IX BBS and Public Access UNIX
    moderator of comp.binaries.ibm.pc and 80386 mailing list
"Stupidity, like virtue, is its own reward" -me



More information about the Comp.unix.shell mailing list