Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: ls most recent files in a hierarchy



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