How Do You Check When Was File Last Accessed Linux?
Contents

You can use -mtime option. It returns list of file if the file was last accessed N*24 hours ago. For example to find file in last 2 months (60 days) you need to use -mtime +60 option.

How can I tell when a file was last accessed?

File Explorer has a convenient way to search recently modified files built right into the “Search” tab on the Ribbon. Switch to the “Search” tab, click the “Date Modified” button, and then select a range.

How can you find out if a user has accessed a file Linux?

To find out what or who has a file open now, use lsof /path/to/file . To log what happens to a file in the future, there are a few ways: Use inotifywait. inotifywait -me access /path/to will print a line /path/to/ ACCESS file when someone reads file .

James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest