Leaf directories (Re: Why is find so slow)

Conor P. Cahill cpcahil at virtech.uucp
Sat Oct 13 10:47:19 AEST 1990


In article <15052 at hydra.gatech.EDU> gt0178a at prism.gatech.EDU (Jim Burns) writes:
>in article <F&gya5o2 at cs.psu.edu>, flee at dictionopolis.cs.psu.edu (Felix Lee) says:
>> ftw() as spec'd in System V.3 and SunOS 4.1 doesn't special-case leaf
>> directories, so you can't implement lazy stat()ing.
>
>I'm confused - what's a leaf directory, and how does it relate to this
>discussion?

A leaf directory is a directory that has no subdirectories.  If you special
case these directories, you can just read the file names within the
directory without having to stat each entry (since you know that they are
all just files).

You know it is a leaf directory when the number of links to the directory
itself is 2 ("." and the entry in the parent directory).

-- 
Conor P. Cahill            (703)430-9247        Virtual Technologies, Inc.,
uunet!virtech!cpcahil                           46030 Manekin Plaza, Suite 160
                                                Sterling, VA 22170 



More information about the Comp.unix.shell mailing list