Written by georg on Januar 28, 2016
Just a short example of how some basic logrotate in bash could work:
# Logrotate with more than 5 Megabytes
LOGFILESIZE=$(stat -c%s "$LOGFILE")
if [[ $((LOGFILESIZE/1024/1024)) -gt 5 ]]; then
mv $LOGFILE $LOGFILE.old
fi
Schreibe einen Kommentar