Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh arg list too long



jarausch@xxxxxxxxxxxxxxxxxxx (Helmut Jarausch) wrote:
:Sorry, I could find it in the FAQs althoug it should be a common problem.
:On my machine (SGI,IRIX6.1) I often get the error "zsh arg list too long".
:Last time I only tried   rm  ~/.netscape-cache/*
:and it failed because there were (only) 576 files (filename length 24)
:Is this a general restrictions of my OS or is ZSH configurable to allow
:longer parameter lists?

Hrvoje.Niksic@xxxxxxxxxxxxxx (Hrvoje Niksic) replied:
:I noticed it too. It should not be OS restriction, since it works in other
:shells. I am afraid it is a zsh bug.

The limitation is imposed by the OS.  You can usually find it in 
/usr/include/sys/syslimits.h  as something like ARG_MAX (256Kb on my machine)
According to POSIX: "The number of bytes available for the combined
argument list and environment list is given by ARG_MAX macro in <limits.h>"

Look through the /usr/include/**/*limit* files or try something like:  
% fgrep ARG_ /usr/include/**/*.h

Zoltan mentioned that the builtin echo wasn't limited thus, so maybe you 
could do
% echo ~/.netscape-cache/* | xargs rm
or maybe this will work if there aren't too many
% (cd ~/.netscape-cache; echo *)

-- 
Mason [G.C.W]  mason@xxxxxxxxxxxxxxxxxx    "Hurt...Agony...Pain...LOVE-IT"



Messages sorted by: Reverse Date, Date, Thread, Author