Subject: Re: bin/560: ls -i returns incorrect inodes on symlinks and root dirs
To: matthew green , Christopher Hooper <cdh@mtu.edu>
From: I can teach you how to fish... <greywolf@autodesk.com>
List: netbsd-bugs
Date: 11/08/1994 09:33:44
#define AUTHOR "mrg@mame.mu.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
 * aware.

"ls -i" never *used* to do a stat()/lstat() call.

 * 
 * .mrg.
 * 
 * 
 * 
 * 
 * 
 */

#undef AUTHOR	/* "mrg@mame.mu.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: gandalf@netcom.com