From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27711 invoked by alias); 10 Jun 2015 21:46:28 -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: 35436 Received: (qmail 1555 invoked from network); 10 Jun 2015 21:46:27 -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,HTML_MESSAGE,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=26oD633hohMrYD+F4uF4Uw9J5tbbh3bYtRvhZzcGiAs=; b=k6cYLyHLsfKqw6rPZZiHSdy9gF8m2hpapSVdBOSz4KcsC/l9iB9zGtGQyUo8KANCo7 MtGXqAbyKqZ9BU6hBzL/B6oLNn76ztLa0nv15ZmxscanBCFiLH78E1KiJiBmfclpCQBY 4MHauxTd9a76Sq0RT+ZDhD4rkE1EymAMZHJXAeY8VqVFlV28GFFl1VLDJBBkHI3EADB/ vgE68L+78oAn09mrq5UjAjsMqjMWQW0YVymyUI0sMC9rYeEH5XsJeV/lMdqm09U9ofdb IJGNamW5jg9OFAmZR/WKGL5KfGBaWnAliHmZcTpOwQV0FWUbR/YXLt6sOvOo3RqwcJIV BKPA== MIME-Version: 1.0 X-Received: by 10.52.185.69 with SMTP id fa5mr10237732vdc.62.1433972784916; Wed, 10 Jun 2015 14:46:24 -0700 (PDT) In-Reply-To: <20150610204814.4aa2f5aa@hogwart.bsdlocal.net> References: <20150610204814.4aa2f5aa@hogwart.bsdlocal.net> Date: Wed, 10 Jun 2015 17:46:24 -0400 Message-ID: Subject: Re: Length of argument list From: Clint Hepner To: Manfred Lotz Cc: "zsh-workers@zsh.org" Content-Type: multipart/alternative; boundary=bcaec5486476766e46051830ce05 --bcaec5486476766e46051830ce05 Content-Type: text/plain; charset=UTF-8 This is the wrong way to count files in the first place; any matching file names containing newlines (yes, they're legal) would give the wrong count. One alternative is a=( manyfiles/* ) echo ${#a} to create an array containing all the file names, then check the number of elements in the array. On Wed, Jun 10, 2015 at 2: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? > > > > -- > Manfred > --bcaec5486476766e46051830ce05--