1

I find all the PDF files using

find . -type f -name *.pdf

How can I sort the files in the results by the last access time, and then by the last modification time?

By access time, I mean the time when the file is "opened", which, for PDF, typically means the file being opened in Adobe Acrobat.

qazwsx
  • 9,311

1 Answers1

1

to sort by last access time you can try :

find . -type f -printf "\n%AF %AT %p" | sort

by last modification time :

find . -type f -printf "\n%TF %TT %p" | sort

Gilles Gaido
  • 111
  • 1