find

Find files that have not been accessed for a while

Below one liner uses the find command to list files sorted by access time beyond the provided "number of days".

find </path/to/folder> -type f -atime +<number of days> -exec ls -ultr {} \;

This becomes handy if you want to do archive and cleanup of your web folders that have grown to a huge size.

Comment