Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

find oldest accessed files

Tags:

linux

bash

ubuntu

How can I find, let's say, the 100 oldest accessed files? I've tried the following, but it just prints random accessed files.

find /home/you -iname "*.pdf" -atime -100000 -type f | tail -n100
like image 777
rabotalius Avatar asked Jun 11 '26 10:06

rabotalius


1 Answers

find /home/you -iname '*.pdf' -printf '%A@ %p\n' | sort -n | head -n 100
like image 126
John Kugelman Avatar answered Jun 13 '26 01:06

John Kugelman