![]() "rotate-apachelogs", "rotate-lincolnlogs", whatever. Multiple instances of this script can be run, one for each directory of logs you want rotated.The 3 digit prefix on the filename seems only to indicate the execution order of scripts in the folder. ![]() Copy "110.rotate-logs" to /private/etc/periodic/monthly (or weekly, or daily).Edit the wildcard to match the log files.Edit the path to point to the directory containing the logs you want rotated.Open "110.rotate-logs" in your favorite code editor.I created this to manage the Apache and PHP logs generated by my local dev hosting setup. A shell script used by Mac OS's periodic (daily, weekly, monthly) maintenance system to rotate all logs in a given directory.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |