Subject: Re: bin/560: ls -i returns incorrect inodes on symlinks and root dirs
To: matthew green , Christopher Hooper <firstname.lastname@example.org>
From: I can teach you how to fish... <email@example.com>
Date: 11/08/1994 09:33:44
#define AUTHOR "firstname.lastname@example.org.OZ.AU (matthew green)"
* The problem now is that ls now DOES a stat (lstat) for every
* file in a directory. This may not be terribly noticeable
* on a local filesystem with a hundred or so files, but it is
* VERY noticeable on an NFS mounted mail spool with about
* 7,842 files. I guess with the zeal to do ls "properly,"
* performance becomes impertinent.
* huh? ls(1) only does a stat when you ask for info that
* requires it (such as -s, or -i or -l, etc). i just tested
* it with ktrace and there was only one fstat() call and no
* stat() calls. this has always been the case as far as i'm
"ls -i" never *used* to do a stat()/lstat() call.
#undef AUTHOR /* "email@example.com.OZ.AU (matthew green)" */
_______Wizardry is dead._____ _____WHO: Greywolf (my nameplate even says so)
/ ___\ _ \ __\ V / \ / /__ \| | __/WHAT: UNIX System Mangler...er, Admin
\ \| | < _| ` ' \ '` / \/ /|_| _/ WHERE: Autodesk, Inc. 3 Harbor Dr.
\___|_|\_\__\|_| \/\/ \__/___/_| Sausalito, CA 94965 (415) 332-2344 x4219
see also: firstname.lastname@example.org