No, that's not a bug. It's just a (system-dependent) limit shared by all POSIX-compliant systems. The actual limit happens to be on the low side under Cygwin.
Familiarize yourself with the "xargs" command. It's there just to handle these cases.
Also, in many cases the programs themselves process directories and don't need to have each file within the directory passed to them as an argument. Ls certainly does this (hence your "ls *" example has an equivalent without limits: plain old "ls") and the grep family has a -R (recursive) option that's related.
The reason you don't see the problem from a DOS command prompt is that argument handling (in particular, wild-card processing) is different when Cygwin programs are invoked from a DOS CMD.exe or Command.exe shell and that difference effectively side-steps the limit you experience when running under a Cygwin shell (BASH, zsh, tcsh, ash, etc.).
Good luck.
Randall Schulz
Mountain View, CA USA
At 01:59 2002-11-14, Claudio Tamietto wrote:
I have installed cigwin on my W2K PC and all is very well functioning .
However if i try some commands like ls * or grep -i -l some_text * from a
directory whit a lot of files (7-8 thousand) i obtain this error
bash: /usr/bin/ls: Invalid argument
Is it a bug ?
If i try the same commands from a dos shell the error is not reported and all is functioning .
-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/