Re: rotate logs when they reach a certain size

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

 



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
> 


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux