简体   繁体   中英

find oldest accessed files

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
find /home/you -iname '*.pdf' -printf '%A@ %p\n' | sort -n | head -n 100

您可以使用stat命令

stat -c '%X %n' *.pdf | sort -n | head -n100

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM