[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: rotate logs when they reach a certain size
- From: Keith R Wood <linux twopuppypress com>
- To: redhat-list redhat com
- Cc: genti_tek hotmailcom
- Subject: Re: rotate logs when they reach a certain size
- Date: Sat Oct 25 18:11:00 2003
find DIRECTORYNAME -size XX -type f -exec rm -f {} ";"
The above command will search starting in the directory DIRECTORYNAME
(and below) and find all files that are of size XX and delete them.
This command could easily be put in a crontab file.
XX is in 512 byte blocks by default. If c follows XX then the units will
be bytes, if k follows XX then the units would be kilobytes.
Hope this helps.
krw
On Fri, 2003-10-24 at 12:13, Genti Hila wrote:
> The cron jobs and logrotate seem to manipulate logs in a time basis, but i
> was trying to figure out a way how to make the logs delete when they get big
> to a certain size and not in a daily or weekly or whatever time basis.
>
> Does anybody know how to do that in Redhat 9 ?
>
> Genti
>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]