Soapm
07-05-2008, 01:15 PM
My root directory is full of files like this;
LOG_ARCHIVE.0602_09:16.tgz
Anybody see why my Cron is not deleting them?
# Sample below creates a test file and updates it with current time and date
# every 5 minutes -- use this for troubleshooting.
# m h dom mon dow command
#*/5 * * * * date >> /var/log/cron.test.out
# Wipe the logs every Sunday night at 3:18am cst
18 9 * * 1 /busybox/wipelogs; echo "`date` logs wiped" >> /var/log/cronlog-main
# Run fakecall every night at 10:20pm cst
#20 4 * * * tivosh /busybox/fakecall.tcl
# Delete the crond log files every 3 months
22 9 1 */3 * rm /var/log/cronlog-main; echo "`date` cron logs wiped">> /var/log/cronlog-main
# Delete cron.test.out every night at 3:24am cst
#22 9 * * * rm /var/log/cron.test.out; echo "`date` cron.test.out deleted" >> /var/log/cronlog-main
# Weekly reboots. Cleans things out for better performance if you have several hacks running
# Also restarts logs, and allows fakecall to reset the last successful call indicator,
# so your Tivo won't call home (fakecall doesn't update mfs entries without a reboot).
# This allows you to keep your phone line connected for callerID and PPV ordering.
# Run safereboot, so reboot only happens when nothing is recording.
#25 9 * * 1,4 echo "`date` SCHEDULED REBOOT"; tivosh /enhancements/safereboot.tcl >> /var/log/cron
# Display 0n-screen warning messages before scheduled reboots
#5 9 * * 1,4 cd /var/hack/bin; echo 'SCHEDULED REBOOT IN 20 MINUTES...' | /var/hack/bin/out2osd -c1
#15 9 * * 1,4 cd /var/hack/bin; echo 'SCHEDULED REBOOT IN 10 MINUTES...' | /var/hack/bin/out2osd -c
# Tarball the logs before deleting them, every Sunday night at 3:16am cst
16 9 * * 1 mount -o remount,rw /; tar -czvf /LOG_ARCHIVE.$(date +%m%d_%H:%M).tgz /var/log/* >> /var
# Delete the LOG_ARCHIVE files every month
18 9 1 * * rm /LOG_ARCHIVE*; echo "`date` LOG_ARCHIVE deleted"; ro >> /var/log/cronlog-main
# Make a backup of season passes and wishlists every Sunday night at 3:30am CST
31 9 * * 1 cd /enhancements; sh backup_run.sh; echo `date` season pass backup made >> /var/log/cron
# Delete season pass backups every month to save on space
29 9 1 * * mount -o remount,rw /; rm -r /seasonpass_backups; ro
14 9 * * * cd /enhancements; sh drivemonitor.sh; echo "Ran DriveMonitor on `date`" >> /var/log/cron
# End of crontab
LOG_ARCHIVE.0602_09:16.tgz
Anybody see why my Cron is not deleting them?
# Sample below creates a test file and updates it with current time and date
# every 5 minutes -- use this for troubleshooting.
# m h dom mon dow command
#*/5 * * * * date >> /var/log/cron.test.out
# Wipe the logs every Sunday night at 3:18am cst
18 9 * * 1 /busybox/wipelogs; echo "`date` logs wiped" >> /var/log/cronlog-main
# Run fakecall every night at 10:20pm cst
#20 4 * * * tivosh /busybox/fakecall.tcl
# Delete the crond log files every 3 months
22 9 1 */3 * rm /var/log/cronlog-main; echo "`date` cron logs wiped">> /var/log/cronlog-main
# Delete cron.test.out every night at 3:24am cst
#22 9 * * * rm /var/log/cron.test.out; echo "`date` cron.test.out deleted" >> /var/log/cronlog-main
# Weekly reboots. Cleans things out for better performance if you have several hacks running
# Also restarts logs, and allows fakecall to reset the last successful call indicator,
# so your Tivo won't call home (fakecall doesn't update mfs entries without a reboot).
# This allows you to keep your phone line connected for callerID and PPV ordering.
# Run safereboot, so reboot only happens when nothing is recording.
#25 9 * * 1,4 echo "`date` SCHEDULED REBOOT"; tivosh /enhancements/safereboot.tcl >> /var/log/cron
# Display 0n-screen warning messages before scheduled reboots
#5 9 * * 1,4 cd /var/hack/bin; echo 'SCHEDULED REBOOT IN 20 MINUTES...' | /var/hack/bin/out2osd -c1
#15 9 * * 1,4 cd /var/hack/bin; echo 'SCHEDULED REBOOT IN 10 MINUTES...' | /var/hack/bin/out2osd -c
# Tarball the logs before deleting them, every Sunday night at 3:16am cst
16 9 * * 1 mount -o remount,rw /; tar -czvf /LOG_ARCHIVE.$(date +%m%d_%H:%M).tgz /var/log/* >> /var
# Delete the LOG_ARCHIVE files every month
18 9 1 * * rm /LOG_ARCHIVE*; echo "`date` LOG_ARCHIVE deleted"; ro >> /var/log/cronlog-main
# Make a backup of season passes and wishlists every Sunday night at 3:30am CST
31 9 * * 1 cd /enhancements; sh backup_run.sh; echo `date` season pass backup made >> /var/log/cron
# Delete season pass backups every month to save on space
29 9 1 * * mount -o remount,rw /; rm -r /seasonpass_backups; ro
14 9 * * * cd /enhancements; sh drivemonitor.sh; echo "Ran DriveMonitor on `date`" >> /var/log/cron
# End of crontab