Sunday, 18 May 2014

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

No comments:

Post a Comment