#!/bin/tcshSave the script somewhere on your path and make it executable (chmod 755 Script_Name). I decided to rename the log files (to yearMonthDay.HoursMinutesSeconds) inside of the dedicated backup folder for easy future reference. Obviously, inside that folder all the files are backups of access_log. To prove the script worked, just "ls" on both the new and the old directories and you'll see that the file has been moved.
if (! -e /var/log/httpd/weblogsbaks/ ) \
sudo mkdir /var/log/httpd/weblogsbaks/
sudo mv /var/log/httpd/access_log \
/var/log/httpd/weblogsbaks/`date +%y%m%d.%H%M%S`
Note that Apache must be restarted to open a new log file (instead of resuming writing to the previously moved file). You can do this either through the GUI or via the command line with "sudo apachectl gracefeul".
[Editor's note: There's a thread on this on the macosxhints' forum site, with a "new and improved" script that will lotate a number of log files...]

