From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12477 invoked by alias); 3 Sep 2011 19:23:20 -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: 16308 Received: (qmail 6392 invoked from network); 3 Sep 2011 19:23:19 -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 21:23:16 +0200 From: Thor Andreassen To: zsh-users@zsh.org Subject: Re: listing sub-drectories with most files in Message-ID: <20110903192316.GA14785@toggle.be> Mail-Followup-To: zsh-users@zsh.org References: <20110903120208.GC11672@toggle.be> <110903081320.ZM9630@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <110903081320.ZM9630@torch.brasslantern.com> On Sat, Sep 03, 2011 at 08:13:20AM -0700, Bart Schaefer wrote: > On Sep 3, 2:02pm, Thor Andreassen wrote: > } > } find *(/) | cut -d/ -f1 | uniq -c | sort -n > > That'll tell you how many files are in the entire tree below each local > directory, but not how many files are in each subdirectory in the tree. Right, I didn't read the question well enough. Adding -maxdepth 1 and -type f to find should limit the result correctly: find *(/) -maxdepth 1 -type f | cut -d/ -f1 | uniq -c | sort -n -- best regards Thor Andreassen