Command to set logfiles greater than 100mb to zero

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

Post a Comment