How to find files that was last accessed 12 hours ago ?

Each file in Linux  has three time stamps, which record the last time that certain actions were performed on the file:

[a] access (read the file’s contents) – atime (days) OR  amin (minutes)
[b] change the status (modify the file or its attributes) OR ctime (days) / cmin (minutes)
[c] modify (change the file’s contents) – mtime (days) OR  mmin (minutes)

  • -amin +720 means you are looking for a file accessed 12 hours (720 minutes)  ago.
  • -amin -720 means less than 12 hours (720 minutes).
  • -amin 720 If you skip + or – it means exactly 12 hours (720 minutes).

# find /home/* -iname "*.mp4" -amin -720

Leave a Reply