[geeks] MAX_ARG issue

Jochen Kunz jkunz at unixag-kl.fh-kl.de
Fri Oct 24 10:23:51 CDT 2003


On 2003.10.24 12:34 Kevin wrote:
> I'm getting the "bash: /bin/rm: Argument list too long" errors on one
> of my linux servers so i did a getconf ARG_MAX and i get back
"131072". 
> Is there a way of increasing the MAX_ARG variable?  Are there any
> concerns with increasing this limit?
The limiting factor here is the max. size of the argument list that you
can pass to exec(2). This is a limit of the OS. I know of no easy way to
increase this.

> I've gotten around the issue today using "find ./ -iname "spam*" -exec
> rm {} \;" but i will be doing this frequently for the next few weeks
> so i would like to be able to use ls and rm here without issues.
RTFM: xargs(1). 
-- 


tsch|_,
       Jochen

Homepage: http://www.unixag-kl.fh-kl.de/~jkunz/



More information about the geeks mailing list