zsh-workers
 help / color / mirror / code / Atom feed
* zsh arg list too long
@ 1996-02-09  9:26 Helmut Jarausch
  1996-02-12 12:17 ` Hrvoje Niksic
  0 siblings, 1 reply; 4+ messages in thread
From: Helmut Jarausch @ 1996-02-09  9:26 UTC (permalink / raw)
  To: zsh-list

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?

Thank you for your help,

Helmut Jarausch.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: zsh arg list too long
  1996-02-09  9:26 zsh arg list too long Helmut Jarausch
@ 1996-02-12 12:17 ` Hrvoje Niksic
  1996-02-12 12:49   ` Zoltan Hidvegi
  1996-02-13  7:32   ` Geoff Wing
  0 siblings, 2 replies; 4+ messages in thread
From: Hrvoje Niksic @ 1996-02-12 12:17 UTC (permalink / raw)
  To: Helmut Jarausch; +Cc: zsh-workers

In your mail, you said:
> Last time I only tried   rm  ~/.netscape-cache/*
> and it failed because there were (only) 576 files (filename length 24)

I noticed it too. It should not be OS restriction, since it works in other
shells. I am afraid it is a zsh bug.

-- 
hniksic@srce.hr              |  Student of electrical engineering
http://www.srce.hr/~hniksic/ |  University of Zagreb, Croatia
------------------------------------------------------------------
He didn't administer the reign of terror, just the occasional light shower.
        -- (Terry Pratchett, Sourcery)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: zsh arg list too long
  1996-02-12 12:17 ` Hrvoje Niksic
@ 1996-02-12 12:49   ` Zoltan Hidvegi
  1996-02-13  7:32   ` Geoff Wing
  1 sibling, 0 replies; 4+ messages in thread
From: Zoltan Hidvegi @ 1996-02-12 12:49 UTC (permalink / raw)
  To: hniksic; +Cc: jarausch, zsh-workers

Hrvoje Niksic <hniksic@srce.hr> wrote:
> In your mail, you said:
> > Last time I only tried   rm  ~/.netscape-cache/*
> > and it failed because there were (only) 576 files (filename length 24)
> 
> I noticed it too. It should not be OS restriction, since it works in other
> shells. I am afraid it is a zsh bug.

What other shells does it work?  The `arg list too long' message comes from
the OS.  If the arg list is long execve fails and sets errno to E2BIG.
Builtin zsh commands can have arbitrary long argument lists.  If you do not
believe me, grep the zsh source for the arg list too long message.  You won't
find it.  The maximum allowed length of the argument list is very OS
dependent.  E.g. on Linux I can do:

bolyai /l/src % /bin/echo ([nzk]|t[^au])*/**/*|wc
      1    4346  127155

But here 128k is the maximum.  On Ultrix and probably on other OS'es as well
the limit is much lower.

Note that you must use /bin/echo above since the echo builtin can have any
number of arguments.

Cheers,

Zoltan


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: zsh arg list too long
  1996-02-12 12:17 ` Hrvoje Niksic
  1996-02-12 12:49   ` Zoltan Hidvegi
@ 1996-02-13  7:32   ` Geoff Wing
  1 sibling, 0 replies; 4+ messages in thread
From: Geoff Wing @ 1996-02-13  7:32 UTC (permalink / raw)
  To: zsh-list

jarausch@igpm.rwth-aachen.de (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@public.srce.hr (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@werple.mira.net.au    "Hurt...Agony...Pain...LOVE-IT"


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1996-02-13  8:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-02-09  9:26 zsh arg list too long Helmut Jarausch
1996-02-12 12:17 ` Hrvoje Niksic
1996-02-12 12:49   ` Zoltan Hidvegi
1996-02-13  7:32   ` Geoff Wing

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).