Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!brutus.cs.uiuc.edu!apple!vsi1!daver!lynx!m5 From: m5@lynx.uucp (Mike McNally) Newsgroups: comp.unix.wizards Subject: Re: ftw (Joe Pruett's descend). Keywords: ftw descend Message-ID: <6675@lynx.UUCP> Date: 18 Dec 89 16:47:12 GMT References: <152@norsat.UUCP> <2586@unisoft.UUCP> <159@norsat.UUCP> <1989Nov21.070322.6352@dragos.uucp> <1989Nov25.232922.11072@eng.umd.edu> <564@balthmus.tessi.UUCP> <391@oha.UUCP> Organization: Lynx Real-Time Systems, Inc., Campbell CA Lines: 25 tony@oha.UUCP (Tony Olekshy) writes: >In message <564@balthmus.tessi.UUCP>, joey@tessi.UUCP (Joe Pruett) writes: >> >> A quick hack I've used in a directory traversal program is to use the >> link count of . to determine how many subdirectories there are. If . >> has no subdirectories, then you don't have to stat every file name. >This is great. >It's three times faster . . . I'm going to give this a try in a couple of our utilities. Of course, if the tree traversal is supposed to follow symbolic links, you're stuck with the lstats. Most of the time it's not a problem. -- Mike McNally Lynx Real-Time Systems uucp: {voder,athsys}!lynx!m5 phone: 408 370 2233 Where equal mind and contest equal, go.