ls -l

Bob Deroy rwd at bu-cs.BU.EDU
Mon Dec 5 00:56:47 AEST 1988


In article <6060018 at hpcupt1.HP.COM> steiny at hpcupt1.HP.COM (Don Steiny) writes:
>/ hpcupt1:comp.unix.questions / reeder at ut-emx.UUCP (William P. Reeder) /  3:26 pm  Nov 30, 1988 /
>In article <838 at nih-csl.UUCP>, ted at 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 at bu-it.bu.edu
CSNET: rwd%bu-it at bu-cs  	       BITNET: engbd3c at buacca



More information about the Comp.unix.questions mailing list