Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ls most recent files in a hierarchy
- X-seq: zsh-users 10033
- From: Lloyd Zusman <ljz@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: ls most recent files in a hierarchy
- Date: Wed, 15 Mar 2006 21:10:03 -0500
- Cancel-lock: sha1:Oe4L+000ct43EvRSNlaZwRi2KcA=
- Cc: zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <Xns9788654E75Bzzappergmailcom@xxxxxxxxxxx> <20060316014618.GC16669@xxxxxxxxxxxxxxxxxxx>
- Sender: news <news@xxxxxxxxxxxxx>
Christian Schneider <strcat@xxxxxxx> writes:
> * zzapper <david@xxxxxxxxxx> 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@xxxxxxxxxx
God bless you.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author