At 10:54 PM -0500 1/4/02, David Miller wrote: >What I usually want to do is something more like ls *.out |wc -l, >or grep something *.data or cat *.foo | grep something. > >I have rebuilt the system in the past after greatly expanding >ARG_MAX, and that does what I want. I'm just looking for an easy >way to preserve it across cvsups, not looking for alternate ways >to list the files in a directory:)
While "greatly expanding" ARG_MAX might do what you want, it is a bad idea as there are a number of side-effects to doing that. You are not "just fixing" your problem, you are greatly increasing the memory usage of many things in the system -- some of which are going to assume the official POSIX setting for ARG_MAX (intentionally or unintentionally) no matter what you change it to. That is a mighty big hammer to swing to fix the problem you're talking about, and it's a hammer that you're going to have to keep "expanding" as you get more files to process. I doubt you'll be thrilled with this answer, as I am also going to ignore your direct question to answer what *I* consider to be "the bigger" question, but I would do this some other way. If it were me, I would write a script in perl or ruby which would do the operations I feel I need to do on these directories of files. Maybe I'd even generalize it, so I could feed it "normal-looking" commands, and the script would know how to break up the list of files to get the right results -- without going over ARG_MAX. This way you don't have to care about changing the size of ARG_MAX. -- Garance Alistair Drosehn = [EMAIL PROTECTED] Senior Systems Programmer or [EMAIL PROTECTED] Rensselaer Polytechnic Institute or [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message