Date: Fri, 4 Jan 2002 22:54:11 -0500 (EST) From: David Miller <dmiller@sparks.net> To: Terry Lambert <tlambert2@mindspring.com> Cc: freebsd-hackers@freebsd.org Subject: Re: Overriding ARG_MAX Message-ID: <Pine.BSF.4.21.0201042248520.27496-100000@search.sparks.net> In-Reply-To: <3C3677AB.3E9BE6ED@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 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. > > I don't believe you. There is no ARG_MAX limit on pipes. My apologies. Leo also noted that. I was trying to give a quick example to a general problem and I got a little too quick. 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:) > 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, which was: Is there any easy way to override ARG_MAX (or arbitrary other paramaters) in make.conf or a config file, or something else altogether? --- David To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0201042248520.27496-100000>