Path: utzoo!utgpu!watmath!clyde!att!rutgers!mit-eddie!bloom-beacon!bu-cs!rwd
From: rwd@bu-cs.BU.EDU (Bob Deroy)
Newsgroups: comp.unix.questions
Subject: Re: ls -l
Message-ID: <26419@bu-cs.BU.EDU>
Date: 4 Dec 88 14:56:47 GMT
References: <838@nih-csl.UUCP> <6060018@hpcupt1.HP.COM>
Reply-To: rwd@bu-it.bu.edu (Bob Deroy)
Followup-To: comp.unix.questions
Organization: Boston University
Lines: 26

In article <6060018@hpcupt1.HP.COM> steiny@hpcupt1.HP.COM (Don Steiny) writes:
>/ hpcupt1:comp.unix.questions / reeder@ut-emx.UUCP (William P. Reeder) /  3:26 pm  Nov 30, 1988 /
>In article <838@nih-csl.UUCP>, ted@nih-csl.UUCP (ted persky) writes:
>>> it seems that, even for long directory listings, the command takes a very short
>>> amount of time to complete, considering all the file opening and closing I guess
>
>>My experience has been that ls can take a very long time to run on
>>large directories.  Several posters have already explained that ls
>>doesn't have to open each file in the directory; 
>
>	To display the user name, it needs to map the uid to the name
>in the /etc/passwd file.   On systems with many users this can take
>a long time.

This really annoyed me, so I wrote a small program that reads a
directory and hashes the passwd file. It runs a good deal faster than
ls -l. It's not fancy and I use ls most of the time, but it does come
in handy at times for those directories many users write to. If you  
would like to see the hashing code, mail me and I will send it to
you.



-- 
UUCP:	...!harvard!bu-cs!bu-it!rwd  INTERNET: rwd@bu-it.bu.edu
CSNET: rwd%bu-it@bu-cs  	       BITNET: engbd3c@buacca