command to display the recent modifed files
am 24.10.2007 19:11:25 von Rahul
Hi Everyone,
I know that ls -lrt displays the files in a sorted order of most
frequently used. However i want to display the list of files modified
over a period of time, like last 10 days or so...
Thanks in advance!!!
Re: command to display the recent modifed files
am 24.10.2007 19:35:49 von Bill Marcum
On 2007-10-24, Rahul wrote:
> Hi Everyone,
>
> I know that ls -lrt displays the files in a sorted order of most
> frequently used. However i want to display the list of files modified
> over a period of time, like last 10 days or so...
>
> Thanks in advance!!!
>
find . -mtime -10
Re: command to display the recent modifed files
am 24.10.2007 20:38:01 von Stephane CHAZELAS
2007-10-24, 17:11(-00), Rahul:
> Hi Everyone,
>
> I know that ls -lrt displays the files in a sorted order of most
> frequently used. However i want to display the list of files modified
> over a period of time, like last 10 days or so...
[...]
With zsh, *(m-10) expands to the list of files modified within
the last 10 days.
So:
ls -lrtd -- *(m-10)
for instance to list their attributes. zsh can also sort them by
modification time.
*(om) is the list of files from the most to the least recent.
*(om[1,10]) are therefore the 10 most recent files (ranked
from the most to the least recent).
Of course you can combine those, and add more qualifiers such as
ask only for regular files, or files of a given size...
--
Stéphane