[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Ageing logs



At 11:03 PM 28/10/02 -0600, you wrote:
Hi all.

I'm running into a problem where users are exceeding their disk quotas because
the log files are taking a lot of space.  In some cases I've seen over 10 Megs
of files in the log/* directories.  Is there any way to automatically delete
the older logs after a certain amount of time?

Thanks for any information and/or help.

John

Sounds like Logrotate is not doing it's job.

If you want them to just disappear, a slight modification to this script would do it:

#!/bin/bash
find /home/virusmails -type f -atime 7 -exec rm "{}" \;

We run this as a cron job to remove any quarantined file found by our virus scanner that are over 7 days old.

- Bill B.




---------------------------------
William J.A. Brillinger
Precision Design Co.

E-Mail:   mailto:billy@xxxxxxxxxx
Web site: http://www.pdcweb.net