delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/10/16/18:31:05

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: "one2001boy AT yahoo DOT com" <one2001boy AT yahoo DOT com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040514
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: latest ls.exe version in XP problem
References: <6jKbd.13476$nj DOT 4016 AT newssvr13 DOT news DOT prodigy DOT com> <416fec3d AT news DOT upm DOT es> <EsSbd.30793$QJ3 DOT 6857 AT newssvr21 DOT news DOT prodigy DOT com> <01c4b377$Blat.v2.2.2$bd9427e0 AT zahav DOT net DOT il>
In-Reply-To: <01c4b377$Blat.v2.2.2$bd9427e0@zahav.net.il>
Lines: 40
Message-ID: <pSgcd.31525$QJ3.30700@newssvr21.news.prodigy.com>
NNTP-Posting-Host: 69.104.245.224
X-Complaints-To: abuse AT prodigy DOT net
X-Trace: newssvr21.news.prodigy.com 1097964053 ST000 69.104.245.224 (Sat, 16 Oct 2004 18:00:53 EDT)
NNTP-Posting-Date: Sat, 16 Oct 2004 18:00:53 EDT
Organization: SBC http://yahoo.sbc.com
X-UserInfo1: [[PAPDONEZVSSWLSX@]D]_\@VR]^@B AT MCPWZKB]MPXH AT ETUCCNSKQFCY@TXDX_WHSVB]ZEJLSNY\^J[CUVSA_QLFC^RQHUPH[P[NRWCCMLSNPOD_ESALHUK AT TDFUZHBLJ\XGKL^NXA\EVHSP[D_C^B_^JCX^W]CHBAX]POG AT SSAZQ\LE[DCNMUPG_VSC AT VJM
Date: Sat, 16 Oct 2004 22:00:53 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Eli Zaretskii wrote:
>>From: "one2001boy AT yahoo DOT com" <one2001boy AT yahoo DOT com>
>>Date: Fri, 15 Oct 2004 15:58:28 GMT
>>
>>I think the algorith for ls.exe might be optimized so that it can
>>display some processed files and directory first, not wait till all
>>files are processed.
> 
> 
> ls.exe cannot possibly do that because it sorts the files according to
> some criterion (by default, the file name).  How can it possibly sort
> the files before it has them all?
> 

It is fine to sort by filename, but I think ls.exe also will check if 
the file is direcotry/file/executable/ etc.

If I have three thousand files, ls.exe might need to process all of them 
and then start to display. What I mean is that if ls.exe sort and then 
check 100 files for directory name/file name/executable, and then 
display those 100 files, and then process the rest files to check the 
directory name/file name/executable. it can avoid the long waiting time.



> 
>>dir can display the file and directory, "ls" cannot tell the difference 
>>between file and direcotry in the display. thus, "ls -F" is preferred. 
>>but it is too slow to use for directory with thousandss of files.
> 
> 
> If all you need is to know whether a file is a directory, then ls.exe
> is not the best tool for that.  Use test.exe from Sh-utils, or
> find.exe from Findutils.  They are much faster for this kind of job.

I want to display all files and subdirectories in a directory, not only 
one file or one subdirectory in a directory.

Thus, I have to use ls.exe -F, or dir. But ls.exe -f won't be a solution 
if the directory has 2000 or 3000 files.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019