Search This Blog

Linux: find files by date

  • Find files modified between 2013-01-01 and 2013-12-31:
    touch --date "2013-01-01" /tmp/start
    touch --date "2013-12-31" /tmp/end
    find /data/images -type f -newer /tmp/start -not -newer /tmp/end
  • Find .sh files accessed 7 days ago:
    find ~ -iname "*.sh" -atime -7 -type -f

No comments:

Post a Comment