Read the rest of the article for the script...
Here's the script:
#Script File to move the gzipped logsReplace USERNAME with your actual short user name. Place this script anywhere you want (I put it as /etc/logs). Then, add this to the end of your /etc/crontab file:
#First, moves all *.gz files from /var/log to /Users/USERNAME/logs/**THECURRENTDATE**
#Then changes the owner to USERNAME and the group to admin
CURRDATE=`/bin/date +%m-%d-%y`
/bin/mkdir /Users/USERNAME/logs/$CURRDATE
/bin/mv /var/log/*.gz /Users/USERNAME/logs/$CURRDATE
/usr/sbin/chown USERNAME /Users/USERNAME/logs/$CURRDATE/*
/usr/bin/chgrp admin /Users/USERNAME/logs/$CURRDATE/*
35 4 * * * root sh /etc/logsReplace "/etc/logs" with wherever you placed the script. Also change the time to about a half an hour after the last maintenance script is run (the first two numbers, in MINUTE HOUR form). Thus, if I listed the contents of /Users/bfoster/logs, I would see this:
[maclaxguy:~/logs] bfoster% ls -FAnd you'll have the logs from the corresponding dates in each directory. Oh, and you'll also need to create the /Users/USERNAME/logs directory. Hope you find this usefull.
07-23-02/ 07-24-02/ 07-25-02/

