From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28367 invoked by alias); 3 Sep 2011 12:43:36 -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: 16306 Received: (qmail 20585 invoked from network); 3 Sep 2011 12:43:25 -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=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at toggle.be does not designate permitted sender hosts) Date: Sat, 3 Sep 2011 14:02:08 +0200 From: Thor Andreassen To: zsh-users@zsh.org Subject: Re: listing sub-drectories with most files in Message-ID: <20110903120208.GC11672@toggle.be> Mail-Followup-To: zsh-users@zsh.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Sep 02, 2011 at 03:24:14PM +0000, zzapper wrote: > Hi, > I'm grepping a tree (grep string **/*) and want to list the subdirectories > which have the most files. This is because the grep is taking ages and I'm > hoping I can exclude some of these. > > I guess an easy job for zsh? Alternative way: find *(/) | cut -d/ -f1 | uniq -c | sort -n -- best regards Thor Andreassen