Find files newer than a certain time/date

Page content

Find’s hidden magic for finding only files newer than x date

find . -newermt $(date +%Y-%m-%d -d '1 day ago') -type f -print
find . -newermt $(date +%Y-%m-%d -d '1 week ago') -type f -print
find . -newermt $(date +%Y-%m-%d -d '1 week ago') -type f -print
find . -newermt $(date +%Y-%m-%d -d '1 year ago') -type f -print
find . -newermt $(date +%Y-%m-%d -d '1 hour ago') -type f -print