Last 10 modified files...

Loïc Grenié loic.grenie at gmail.com
Thu Feb 24 08:16:19 UTC 2011


2011/2/24 Sandy Harris <sandyinchina at gmail.com>:
> On Thu, Feb 24, 2011 at 2:53 PM, Ashim Kapoor <ashimkapoor at gmail.com> wrote:
>
>> is there a way to see the last 10 modified files on my computer
>
> Have a look at the man page for find(1).  That will at least let you
> find everything named *.txt that was saved in a certain time interval.
>
> You might also try a pipeline, joining commands with | symbol so
> the output of one becomes input to the the next. ls -lR should
> give a long list (R is recursive, l is long) of all your files, pipe that
> to sort(1) with the right options (need a man page again) to sort by

find ~ -type f -print0 | xargs -0 ls -ltr | tail -10

   (might last a long time and it might not work if you have too many
  files)

            Loïc




More information about the ubuntu-users mailing list