Subject: Re: Getting file info. in a directory "quickly"
To: Wojciech Puchar <>
From: Jed Davis <>
List: tech-kern
Date: 01/16/2002 19:30:41
Wojciech Puchar <> writes:

> > What prompted me to ask?  Reading someone saying write "Konquerer took
> > forever to display a large directory on Linux" and then say "Explorer
> try this with ls - use same system call and works fast.

ISTR that Konqueror use the equivalent of file(1) to determine file
types; thus, the actual directory operations might be fast, but
opening each file, doing reads and interpreting the magic table, and
then maybe even going looking for an icon could be what's taking all
the time.

--Jed, assuming that the KPeople aren't *quite* nuts enough to
  actually exec the system's file(1).

#!/usr/bin/perl -- ## "But life wasn't yes-no, on-off.  Life was shades of gray,
sub f{(($n,$d,@_)=@_)?(substr(## and rainbows not in the order of the spectrum."
" ExhortJavelinBus",$n&&$d/$n,1),$n?f($d##   -- L. E. Modesitt, Jr., _Adiamante_
%$n,$n,@_):&f):("\n")}print f 1461,10324,55001,444162,1208,1341,5660480,79715997