There has been some discussion here about the periodic maintenance tasks and making them run:
10.4: Reschedule periodic maintenance tasks
A simple shell script to run system maintenance tasks
What hasn't so far been addressed is the logs themselves. I got very interested in these as I suddenly (under 10.4) couldn't account for 5GB on my hard disk. It turns out that the primary culprit was the daily.out log file that had simply grown out of all proportions. The periodic logs are never cleaned up, and thus just grow in size each and every time the periodic maintenance tasks are run. For example:
[21:02:42@/]$ ls -alOFG /private/var/log/*.out
-rw-r--r-- 1 root wheel - 509376 17 Jul 03:15 /private/var/log/daily.out
-rw-r--r-- 1 root wheel - 676 1 Jul 07:52
/private/var/log/monthly.out
-rw-r--r-- 1 root wheel - 10023 12 Jul 03:25
/private/var/log/weekly.outI've found two ways of handling this (there are of course more solutions -- find the one that suits your needs).
Solution #1: Don't log -- let's be honest, who actually reads these logs? Run the following as root (sudo). This will redirect the output from the periodic tasks into the computational equivalent of a black hole:
[07:42:52@Scripts]$ cat deleteOut.bash
#!/bin/bash
#
# delete the old log file
#
where=$(pwd)
echo rm /private/var/log/${where#*/}.out
The script finds out from where it's been run from, and on the basis of this, deletes the appropriate log file. Thus, the script is generic and I don't have to maintain more than one version of it. Here are the links to create:
sudo ln -s ~bjarne/Scripts/deleteOut.bash /private/etc/periodic/daily/000.deleteOut
sudo ln -s ~bjarne/Scripts/deleteOut.bash /private/etc/periodic/weekly/000.deleteOut
sudo ln -s ~bjarne/Scripts/deleteOut.bash /private/etc/periodic/monthly/000.deleteOutMac OS X Hints
http://hints.macworld.com/article.php?story=20080716233104998