/etc/cron.daily/logrotate - Ubuntu 12.04.1 - Default File

Attached below is the orginal /etc/cron.daily/logrotate file. This file holds the a script that is ran daily to rotate common log files.(/var/log/)  The file is from Ubuntu Desktop 12.04.1 (32-bit) system. 




System Information (File was pulled from):

Ubuntu Desktop 12.04.1 (32-Bit)




File Permissions:

4 -rwxr-xr-x 1 root root 372 Oct  4  2011 /etc/cron.daily/logrotate







File Contents:


# Clean non existent log file entries from status file
cd /var/lib/logrotate
test -e status || touch status
head -1 status > status.clean
sed 's/"//g' status | while read logfile date
    [ -e "$logfile" ] && echo "\"$logfile\" $date"
done >> status.clean
mv status.clean status
test -x /usr/sbin/logrotate || exit 0
/usr/sbin/logrotate /etc/logrotate.conf









If you have a file that you would like to see added please send an email on the contact page and let us know about it. 

Original File: