[geeks] MAX_ARG issue
Lionel Peterson
lionel4287 at yahoo.com
Fri Oct 24 14:14:16 CDT 2003
--- Kevin <kevin at mpcf.com> 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?
Couldn't you simply code a loop and insert "head" or "tail" of
sufficient size to keep feeding "rm" a safe amount of arguments?
For example:
Begin
ls * | head 131072 | rm
Repeat (until `ls *` returns null)
Maybe put this kind of construction in a shell script, and call it
mega_rm? ;^)
=====
Lionel
"I am not into examining other peoples' dumps..." - Sheldon T. Hall
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
More information about the geeks
mailing list