From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21218 invoked by alias); 10 Jun 2015 20:09:09 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 35435 Received: (qmail 17052 invoked from network); 10 Jun 2015 20:09:08 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.0 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== MIME-Version: 1.0 X-Received: by 10.50.143.104 with SMTP id sd8mr29873842igb.14.1433966946366; Wed, 10 Jun 2015 13:09:06 -0700 (PDT) In-Reply-To: <20150610204814.4aa2f5aa@hogwart.bsdlocal.net> References: <20150610204814.4aa2f5aa@hogwart.bsdlocal.net> Date: Wed, 10 Jun 2015 22:09:06 +0200 Message-ID: Subject: Re: Length of argument list From: Mikael Magnusson To: Manfred Lotz Cc: "zsh-workers@zsh.org" Content-Type: text/plain; charset=UTF-8 On Wed, Jun 10, 2015 at 8:48 PM, Manfred Lotz 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