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

Re: ls most recent files in a hierarchy



* zzapper <david@xxxxxxxxxx> typed:
> I should know this but i'm tired
> 
> 1) list all the files in a hierarchy modified in last x days

ls -tld **/*(m-2) # modified in the last 2 days

> 2) list x most recent files in each directory of a hierarchy

ls **/*(D.om[1,5]) # 5 recent files

> 3) list x most recent files in a hierarchy

ls *(D.om[1,5])
-- 
http://www.strcat.de/zsh/#features [*] Christian 'strcat' Schneider
http://www.strcat.de/zsh/#tipps    [*] Email.......: strcat@xxxxxxx
http://www.strcat.de/zsh/#modex    [*] GPG-ID......:       47E322CE
http://www.strcat.de/zsh/#links    [*] [zsh - the Z shell]



Messages sorted by: Reverse Date, Date, Thread, Author