Re: Overriding ARG_MAX

2002-01-08 Thread Garance A Drosihn
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

Re: Overriding ARG_MAX

2002-01-05 Thread Terry Lambert
David Miller wrote: Probably, you are doing something whic you aren't telling us, like saying ls *.c | wc -l or otherwise using globbing that the shell expands to too large a list. The easy answer is use ``find'' instead of ``ls''. Indeed, but it doesn't answer the basic questions,

Re: Overriding ARG_MAX

2002-01-05 Thread Oliver Fromme
David Miller [EMAIL PROTECTED] wrote: What I usually want to do is something more like ls *.out |wc -l ls | grep '\.out$' | wc -l or grep something *.data ls | grep '\.data$' | xargs grep something or cat *.foo | grep something. ls | grep '\.foo$' | xargs cat | grep something In

Re: Overriding ARG_MAX

2002-01-05 Thread Leo Bicknell
Ok, there are several issues here that I just have to point out. :-) In a message written on Sat, Jan 05, 2002 at 09:48:40PM +0100, Oliver Fromme wrote: ls | grep '\.out$' | wc -l One process shorter: find -name *.out -maxdepth 0 | wc -l ls | grep '\.data$' | xargs grep something Two

Re: Overriding ARG_MAX

2002-01-05 Thread Oliver Fromme
Leo Bicknell [EMAIL PROTECTED] wrote: In a message written on Sat, Jan 05, 2002 at 09:48:40PM +0100, Oliver Fromme wro te: ls | grep '\.out$' | wc -l One process shorter: find -name *.out -maxdepth 0 | wc -l OK, but I tried to be as portable as possible, while -maxdepth is not

Re: Overriding ARG_MAX

2002-01-05 Thread Oliver Fromme
Sorry for replying to myself, but this just came to my mind ... Oliver Fromme [EMAIL PROTECTED] wrote: David Miller [EMAIL PROTECTED] wrote: What I usually want to do is something more like ls *.out |wc -l ls | grep '\.out$' | wc -l A smaller solution would be: echo *.out | wc -w

Overriding ARG_MAX

2002-01-04 Thread David Miller
Apologies if this belongs on -questions. I couldn't find what I needed in the archives or handbook. I have a system where I need/want to handle lots of files in a single directory. Lots as in 100-200K files. ls | wc -l breaks because the value of ARG_MAX in sys/syslimits.h is too small. If

Re: Overriding ARG_MAX

2002-01-04 Thread Brooks Davis
On Fri, Jan 04, 2002 at 09:50:45PM -0500, David Miller wrote: Apologies if this belongs on -questions. I couldn't find what I needed in the archives or handbook. It almost certaintly did. I have a system where I need/want to handle lots of files in a single directory. Lots as in 100-200K

Re: Overriding ARG_MAX

2002-01-04 Thread Terry Lambert
David Miller wrote: Apologies if this belongs on -questions. I couldn't find what I needed in the archives or handbook. I have a system where I need/want to handle lots of files in a single directory. Lots as in 100-200K files. ls | wc -l breaks because the value of ARG_MAX in

Re: Overriding ARG_MAX

2002-01-04 Thread Terry Lambert
Brooks Davis wrote: I have a system where I need/want to handle lots of files in a single directory. Lots as in 100-200K files. ls | wc -l breaks because the value of ARG_MAX in sys/syslimits.h is too small. If I change it from 65536 to 4meg and rebuild the world it works fine. ls |

Re: Overriding ARG_MAX

2002-01-04 Thread David Miller
On Fri, 4 Jan 2002, Terry Lambert wrote: David Miller wrote: Apologies if this belongs on -questions. I couldn't find what I needed in the archives or handbook. I have a system where I need/want to handle lots of files in a single directory. Lots as in 100-200K files. ls | wc -l

Re: Overriding ARG_MAX

2002-01-04 Thread Brooks Davis
On Fri, Jan 04, 2002 at 07:53:52PM -0800, Terry Lambert wrote: Brooks Davis wrote: I have a system where I need/want to handle lots of files in a single directory. Lots as in 100-200K files. ls | wc -l breaks because the value of ARG_MAX in sys/syslimits.h is too small. If I change