stat of i-node
Mike Haertel
mike at thor.acc.stolaf.edu
Sun Sep 3 04:52:49 AEST 1989
In article <179 at bmers58.UUCP> davem at bmers58.UUCP (Dave Mielke) writes:
>In article <19362 at mimsy.UUCP> chris at mimsy.UUCP (Chris Torek) writes:
>>fstat() is a very cheap operation. stat() is a bit more expensive, but
>>(with name cacheing) not all that bad.
>The problem with fstat is that it requires an open which also does a
>name lookup. This proves to be very slow when the directories get
>large. I need a way to get the information that stat would return
>without the expense of a name lookup.
stat() in a simple file name in the current directory ought to be pretty
fast. in 4.3BSD if you stat() the files of a directory in sequence of
the actual directory entries, the kernel remembers where the previous
search left off and does even better.
--
Mike Haertel <mike at stolaf.edu>
``There's nothing remarkable about it. All one has to do is hit the right
keys at the right time and the instrument plays itself.'' -- J. S. Bach
More information about the Comp.unix.wizards
mailing list