SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
*/8 * * * * root find /var/log /var/local/log -size +100M -type f | while read file; do cat /dev/null > $file && echo "$file > 100M (set to zero)"; done
Home / Centos / Linux / ubuntu / Command to set logfiles greater than 100mb to zero
Subscribe to:
Post Comments (Atom)
Post a Comment
Post a Comment