Cron Job Delete Files Older Than 30 Days
Cron Job Delete Files Older Than 30 Days Average ratng: 5,9/10 2947 reviews
Cron Job To Delete Log Files Older Than 30 Days
Cost installing gutters. Code: find /path/to/files.mtime +15 -type f xargs -I xx rm -f xxI just wanted to mention you are wanting to get files that have not been modified in more than 15 days and not files that have not been accessed in more than 15 days right? Use the -atime if you want get files that have not been accessed in more than 15 days.Just to touch on the wildcard as others have, if you are checking all files in your pathtofiles directory then you don't need it at all. If you are just wanting the files that start with 'a' for example to be looked at in that directory then add the -name option with a file card there.