From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8957 invoked from network); 16 Mar 2006 02:13:31 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.0 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 16 Mar 2006 02:13:31 -0000 Received: (qmail 68810 invoked from network); 16 Mar 2006 02:13:24 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 16 Mar 2006 02:13:24 -0000 Received: (qmail 27356 invoked by alias); 16 Mar 2006 02:13:17 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10033 Received: (qmail 27346 invoked from network); 16 Mar 2006 02:13:16 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 16 Mar 2006 02:13:16 -0000 Received: (qmail 67752 invoked from network); 16 Mar 2006 02:13:16 -0000 Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by a.mx.sunsite.dk with SMTP; 16 Mar 2006 02:13:15 -0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FJhzB-0007d7-CV for zsh-users@sunsite.dk; Thu, 16 Mar 2006 03:13:09 +0100 Received: from hippo.e-hippo.net ([216.182.10.250]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 16 Mar 2006 03:13:09 +0100 Received: from ljz by hippo.e-hippo.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 16 Mar 2006 03:13:09 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-users@sunsite.dk From: Lloyd Zusman Subject: Re: ls most recent files in a hierarchy Date: Wed, 15 Mar 2006 21:10:03 -0500 Message-ID: <87hd5zm96s.fsf@asfast.com> References: <20060316014618.GC16669@painless.my-fqdn.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: hippo.e-hippo.net User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:Oe4L+000ct43EvRSNlaZwRi2KcA= Sender: news Cc: zsh-workers@sunsite.dk Christian Schneider writes: > * zzapper typed: >> >> [ ... ] > >> 2) list x most recent files in each directory of a hierarchy > > ls **/*(D.om[1,5]) # 5 recent files Hmm ... this one seems to list the five most recent files among all the files in all the directories. How would we get the 5 most recent files in _each_ directory of the hierarchy? In other words, if, for example, there were 13 directories in the hierarchy, and if each one contained more than five files, the desired result would contain 65 file names. -- Lloyd Zusman ljz@asfast.com God bless you.