juli_ann
asked on
How to display the last time files were accessed.
I need a way to show the last time (date) each .sqr file was accessed on a solaris 9 server. It seems there is a difference between the last time modified, and last time accessed. What I need to know, if possible, is if a file was read or modified, or both (We have a group of developers that have tons of .sqr files, some that are very old, and are not in use any more. I need to identify files that no one has even read in the last year).
I tried using:
find / -name *.sqr -atime -365
but that seems to show only files that were accessed on a specified date, instead of listing the access time of every .sqr file.
Ultimately, these .sqr files need to be grouped by user, and then listed by the last time it was read or modified
Please let me know if I need to provide any other information.
Thanks for your help!
Juliann
I tried using:
find / -name *.sqr -atime -365
but that seems to show only files that were accessed on a specified date, instead of listing the access time of every .sqr file.
Ultimately, these .sqr files need to be grouped by user, and then listed by the last time it was read or modified
Please let me know if I need to provide any other information.
Thanks for your help!
Juliann
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
find / -name *.sqr -atime -365 should list all files accessed within the last year; To display the actual access time, use `ls -lu` or `ls -tu`