Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Length of argument list
- X-seq: zsh-workers 35435
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Manfred Lotz <manfred.lotz@xxxxxxxx>
- Subject: Re: Length of argument list
- Date: Wed, 10 Jun 2015 22:09:06 +0200
- Cc: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Xj5wyj+08fAJW/EhZCyEVX4aXxfu2jh7s+6UPNOK0t0=; b=uBIeNJU44Yx+5V63HCs6QC+zy1fO4A5qRn576DZQ4GFWNBR/YtlaMCq/xps4djwdTr PUKBdSv+0cdKySyk4ZxVuEIdl8knuUZSE6VGRdrO1PxMC3jWH2b/Llh9hHYJ4Eg83VTa S+lUBhiDlAoMmNyqwn4vIapGI0VJb0FFJOiCcRCuxE64uMFBCcK6cn6IwEDPkJAJCB2/ 9n7G1aoC+M+eQQRyywDdQy0TA0uk3BNA/XUH1EhS33e0a0FIvKf+LQsUACk/lhMv7ZRO jz+TLOGW4jx/kA2jz2v1LzYzALARIX4uoqcUyetNz6t+Bt8f8wK+zlQuZR4JOS3V7F/Q bMNQ==
- In-reply-to: <20150610204814.4aa2f5aa@hogwart.bsdlocal.net>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20150610204814.4aa2f5aa@hogwart.bsdlocal.net>
On Wed, Jun 10, 2015 at 8:48 PM, Manfred Lotz <manfred.lotz@xxxxxxxx> wrote:
> Hi all,
> I created 1 million files in a directory callend manyfiles/.
>
> Now
> ls manyfiles/* |wc -l
>
> gives
> zsh: argument list too long: ls
>
>
> Question: Is there a way to change the maximum size of the argument
> list?
That depends on your operating system, on linux it is guided by ulimit
-s (in particular, the argument list is a quarter of the stack size).
On other operating systems, the limit is traditionally quite small.
I'm assuming the above is just an example, but that particular thing
would be better handled by () { echo $# } manyfiles/*, or some
xargs/zargs contraption if you want to be more general.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author