Cron
Hi
Yesterday I had my /var and / full. I saw it was due to the maillog being very very big. How can i set a cron job so that if any file is over 1GB to mail me the name and size of the file with location in my email address and how do i delete that file automatically. If it cannot be done as soon as it reaches 1GB size. Can the the cron do this once a day. Please tell me how do the crontab shell Sanjib gupta |
Quote:
inadvertently delete important files. If you want to limit this deletion to only your maillog (or similar logs), please look at "man logrotate". If you do insist on detecting 1GB files using cron, try using a "find" command, with "-size" option and run that from cron. |
All times are GMT -5. The time now is 05:24 PM. |