Find Files Accessed Before Last 24 Hours in Linux

Last updated on Dec 29, 2019 in Linux

To find files that has been accessed but not changed before last 24 hours (or any number of hours) you need to find files whose last access time, the atime, is older than the specific date. For example, to find out which files has been opened before the last 24 hours.

We use the find command to search the files. Go to your directory and type:

$ find . -atime +1
  • The . is the folder where the search is started, i.e. the current folder in this case
  • -atime searches files by atime, which is the last access time
  • +1 stands for files older than 1 day. You can use any other number here, as well, for example +365for older than 1 year

To search files that has been modified before the last 24 hours, check article: Find Files Older Than 1 Day in Linux