Monday, December 17, 2012

Find Files By Date

If you need a specific date range, than consider using the find command.

In this example find files modified between 15 December 2012 and 16 December 2012, in /var directory:
 
touch --date "2012-12-15" /tmp/start
touch --date "2012-12-16" /tmp/end
find /var -type f -newer /tmp/start -not -newer /tmp/end

No comments: