From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13523 invoked by alias); 10 Sep 2011 17:54:21 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16331 Received: (qmail 20794 invoked from network); 10 Sep 2011 17:54:10 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) 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 autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.220.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=N1qz5eHS6gX4ekjlJ2B4jaJqVk6RfWbZwUW31HJnAVw=; b=Lf+WU7cUjyg30WoGLG3H9jJyTppDsk3pH6qnAdWedE+6MChbiuH7feBioIEXriVBVP zULP698iPUroaCJbMvZqWVMMrQQdQr2aCe2UZh6hUn0l/9ehaqGLRdYY2FZ9J8HJEUtP JWo/Amic+6rwFolUrYaXvZzzo2UGlMND3ePOQ= Subject: Re: listing sub-drectories with most files in Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Aaron Davies In-Reply-To: <20110903120208.GC11672@toggle.be> Date: Sat, 10 Sep 2011 13:53:45 -0400 Cc: zsh-users@zsh.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20110903120208.GC11672@toggle.be> To: Thor Andreassen X-Mailer: Apple Mail (2.1084) On Sep 3, 2011, at 8:02 AM, Thor Andreassen wrote: > On Fri, Sep 02, 2011 at 03:24:14PM +0000, zzapper wrote: >>=20 >=20 >> I'm grepping a tree (grep string **/*) and want to list the = subdirectories=20 >> which have the most files. This is because the grep is taking ages = and I'm =20 >> hoping I can exclude some of these. >=20 > find *(/) | cut -d/ -f1 | uniq -c | sort -n or (for d (**/*(/)) echo `ls $d|wc -l` $d)|sort -n --=20 Aaron Davies aaron.davies@gmail.com