Introduction
Useful list of example for search and compress files by modification date.
Search by date
Find files updated in the last 24 hours
[root@localhost tmp]# find -type f -mtime 0
Find files updated today
[root@localhost tmp]# find -type f -newermt `date +%F`
Find files updated in the last 48 hours
[root@localhost tmp]# find -type f -mtime -2
Find files modified by yesterday
[root@localhost tmp]# find -type f -newermt `date +%F -d yesterday`
Find files updated in the last 72 hours
[root@localhost tmp]# find -type f -mtime -3
Search for files modified up to 3 days ago
[root@localhost tmp]# find -type f -newermt `date +%F -d -3days`
Find files modified after July 1, 2022
[root@localhost tmp]# find -type f -newermt 2022-07-01