Delete files older than X minutes

When used with -mmin, -daystart appears to make it calculate from the end of today, not the beginning.

If you just want to find files modified more than 59 minutes ago, you don’t need that option. -mmin calculates from the current time by default.

barmar@dev:~/testdir$ date
Sat Jul 20 10:02:20 CDT 2013
barmar@dev:~/testdir$ ls -l
total 0
-rw-r--r-- 1 barmar adm 0 Jul 20 09:57 a.txt
barmar@dev:~/testdir$ find . -maxdepth 1 -mmin +2 -type f
./a.txt
barmar@dev:~/testdir$ find . -maxdepth 1 -mmin +10 -type f

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)