This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ls : fails with a long list


At 13:59 2003-03-12, Andrew Markebo wrote:
/ <fergus at bonhard dot uklinux dot net> wrote:
|>> Got two words for you: 'find' and 'xargs'... ;-)
| Thank you. I guess I phrased myself badly. I wasn't saying "How do I do
| this?" (I think ls -AlR gives me pretty well what I was after). I was saying
| "Once I could do this. Now I can't. Does anybody know if anything has
| altered recently? and can anybody explain the phenomenon?" Anyway, it seems
| from an earlier response to be something bash-related, so I imagine for the
| moment I am stuck with it. Thanks again. Fergus

Well it is related to the shell yes. Limitation of the length of the
prompt the shell can handle. (I think ;-))

The prompt? Did I miss something?

There's a limit in all Unix / Linux / POSIX systems on the amount of argument and evironment data that can be passed through the exec(2). That limit varies from system to system, naturally. There might be a POSIX lower bound on that limit, but I'm too lazy to look that up at the moment (it doesn't show up in "ulimit -a").

So if you've got to deal with unbounded quantities of argument data, you've got to be prepared to deal with some kind of limit. Xargs is a generic solution when the arguments don't all need to be processed in a single invocation of the program to which those arguments are being passed. In other cases, it may be necessary to implement a scheme whereby the program can read argument strings from a file.

More and more files coming into the subdir, or the contents are
static?  Or hmm, could be a compilation switch to the compilation of
bash, but wouldn't think so..


Randall Schulz

-- Unsubscribe info: Bug reporting: Documentation: FAQ:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]