Re: find/ls most recent files
Michael Marsh <michael.a.marsh@gmail.com> writes:
> On Apr 4, 2005 8:02 AM, michael <linux@networkingnewsletter.org.uk> wrote:
>> On Mon, 2005-04-04 at 07:34 -0400, Matt Price wrote:
>> > find . -maxdepth 1 -f file -atime -2
>>
>> must be a diff type of find to me... I'd use
>> find . -maxdepth 1 -type f -atime -2
>
> And for a time-ordered listing:
>
> $ ls -ltr `find . -maxdepth 1 -type f -atime -2`
>
> or the equivalent with xargs if find returns too many files.
However, if xargs has to start more than one ls process, the result will
no longer be sorted. Instead, it will be composed of sorted parts (one
per ls process).
Martin
Reply to: