Find files based on date

From Wiki
Jump to: navigation, search

Find can be used to search for files modified *between* certain dates. This is useful when searching for compromised files.

find . -type f -name "*.php" -newermt " 2015-03-12 22:56" -not -newermt "2015-03-12 23:00" | xargs head -1 | less

See also: http://www.tecmint.com/35-practical-examples-of-linux-find-command/