delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/10/18/04:00:48

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> <pSgcd.31525$QJ3 DOT 30700 AT newssvr21 DOT news DOT prodigy DOT com> <01c4b404$Blat.v2.2.2$848b3140 AT zahav DOT net DOT il>
In-Reply-To: <01c4b404$Blat.v2.2.2$848b3140@zahav.net.il>
Lines: 55
Message-ID: <qrKcd.15033$nj.7239@newssvr13.news.prodigy.com>
NNTP-Posting-Host: 69.104.245.224
X-Complaints-To: abuse AT prodigy DOT net
X-Trace: newssvr13.news.prodigy.com 1098085206 ST000 69.104.245.224 (Mon, 18 Oct 2004 03:40:06 EDT)
NNTP-Posting-Date: Mon, 18 Oct 2004 03:40:06 EDT
Organization: SBC http://yahoo.sbc.com
X-UserInfo1: Q[OSS_GGVJB_GZI]]RKB_UDAZZ\DPCPDLXUNNHXIJYWZUYICD^RAQBKZQTZTX\_I[^G_KGFNON[ZOE_AZNVO^\XGGNTCIRPIJH[@RQKBXLRZ AT CD^HKANYVW AT RLGEZEJN@\_WZJBNZYYKVIOR]T]MNMG_Z[YVWSCH_Q[GPC_A AT CARQVXDSDA^M]@DRVUM AT RBM
Date: Mon, 18 Oct 2004 07:40:06 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: Sat, 16 Oct 2004 22:00:53 GMT
>>
>>
>>>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.
> 
> 
> Take a look at the sources: ls.exe already does what you want.

I have not gotten the time to check the code yet.
Just based on what I observerd that "ls -F" takes 30 seconds or more to 
start to display something, while "ls" and "dir" has no such a problem.

> 
> Others said here that on their systems, ls.exe works much faster
> (which is also my experience).  You may wish to look into your system
> configuration to find the reason(s) why it is slow for you.

yes, ls.exe has no problem. the problem is ls.exe -F.

>>>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.
> 
> 
> Sorry, I don't understand: if you want to display all files and
> subdirectories, then what files you do NOT want to display?  Files and
> subdirectories is all we have on Windows, right?  So why a simple
> "ls", without -F, won't do?

with ls -F, if the object is a file, it displays the file name such as 
"xxxx", if it is a directory, it will display "xxxx/", if I have 20 
files in a directory, it will easily for me to find what I want either a 
file or a directory. That is what I like "ls -F", I created an alias for 
"ls" alias to "ls -F", but for a directory with too many files, it 
doesn't work nicely though it works.

Thanks.

- Raw text -


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