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
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,
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
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
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
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
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
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
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
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 |
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
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
12 matches
Mail list logo