Delete all the files older than a specific date
This is the first time I read about -newermt and it's pretty cool, the following command
will remove all the files older than Jan 1st, 2026:
find . ! -newermt "jan 01, 2026" -type f -delete
This is the first time I read about -newermt and it's pretty cool, the following command
will remove all the files older than Jan 1st, 2026:
find . ! -newermt "jan 01, 2026" -type f -delete