Last Updated: May 17, 2022
·
150.2K
· infoslack

List files modified in the last hour - find command

Use find to list files modified within the last hour:

$ find . -mtime -1
  • the . is the search path
  • -mtime time parameter
  • -1 list files modified in the last 24 hours

Other Settings

  • -amin when the file was accessed in minutes
  • -atime when the file was accessed in days
  • -cmin when the file was created in minutes
  • -ctime when the file was created in days
  • -mmin when the file was modified in minutes

Numerical parameters:

-mtime -0.5
  • -1 the last 24 hours
  • -0.5 the last 12 hours
  • -0.25 the last 6 hours
  • +3 more than three days

1 Response
Add your response

This is wrong. The title is "List files modified in the last hour" but it should be "List files modified in the last day". Either that of you should change the command to find . -mmin -60.

over 1 year ago ·