This is the mail archive of the
mailing list for the Cygwin project.
Re: AW: How to make "ls" as quick as a Windows "dir"?
On 2/8/2011 5:25 PM, Paul Maier wrote:
The best thing to do is to skip any flags for 'ls'. If cygwin has to open
the file to fill in a particular piece of data, you're going to see
significant delays on a slow file-system/driver.
So the difference is, that "ls -l" openes all files, reading in all bytes to
count them; while Windows "dir" gets the file size from the directory?
No, it doesn't need to do that for some readily available data like the
file size. But determining whether the file is executable or a symbolic
link can cause the file to be opened. Obviously this takes more time than
reading meta-data and on a slow file system, the lag will be felt more
If you're only seeing the slow-down with Cygwin facilities and things
like 'cd' are very slow too, then it seems like this is something that's
at least more acutely felt under Cygwin. why that would be I'm not even
going to guess. :-)
Perhaps it's time for a full problem report. See the link below for
specifics on what should be in such a report.
Q: Are you sure?
A: Because it reverses the logical flow of conversation.
Q: Why is top posting annoying in email?
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple