Created a really ugly cron to check PPPoE-Connection status which runs every minute. This script produced over 500+ E-Mails in my Maildir.
This command will do the dirty cleaning job and let your fingers relaxed;) [Read more…]
Created a really ugly cron to check PPPoE-Connection status which runs every minute. This script produced over 500+ E-Mails in my Maildir.
This command will do the dirty cleaning job and let your fingers relaxed;) [Read more…]
The simplest way to remove files older than $NUMBER of days..
Dry run (files will be NOT deleted, you will see a list with files older than 100 days)
1 | find -mtime +100 | less |
find -mtime +100 | less
Another dry run, see what would be delete:
1 2 3 | find -mtime +600 | xargs echo rm rm /var/log/squid3/access.log.0 rm /var/log/squid3/access.log.2 |
find -mtime +600 | xargs echo rm rm /var/log/squid3/access.log.0 rm /var/log/squid3/access.log.2
Finally if you decided to remove the files – the final command to delete them:
1 | find -mtime +600 | xargs rm |
find -mtime +600 | xargs rm