Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: listing sub-drectories with most files in
- X-seq: zsh-users 16331
- From: Aaron Davies <aaron.davies@xxxxxxxxx>
- To: Thor Andreassen <ta@xxxxxxxxx>
- Subject: Re: listing sub-drectories with most files in
- Date: Sat, 10 Sep 2011 13:53:45 -0400
- Cc: zsh-users@xxxxxxx
- 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=
- In-reply-to: <20110903120208.GC11672@toggle.be>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <Xns9F54A6DEAC33Bzzappergmailcom@80.91.229.10> <20110903120208.GC11672@toggle.be>
On Sep 3, 2011, at 8:02 AM, Thor Andreassen wrote:
> On Fri, Sep 02, 2011 at 03:24:14PM +0000, zzapper wrote:
>>
>
>> 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.
>
> find *(/) | cut -d/ -f1 | uniq -c | sort -n
or
(for d (**/*(/)) echo `ls $d|wc -l` $d)|sort -n
--
Aaron Davies
aaron.davies@xxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author