Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.unix.shell Subject: Re: Leaf directories (Re: Why is find so slow) Message-ID: <1990Oct13.004719.5844@virtech.uucp> Date: 13 Oct 90 00:47:19 GMT References: <15052@hydra.gatech.EDU> Reply-To: cpcahil@virtech.UUCP (Conor P. Cahill) Organization: Virtual Technologies Inc., Sterling VA Lines: 20 In article <15052@hydra.gatech.EDU> gt0178a@prism.gatech.EDU (Jim Burns) writes: >in article , flee@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