In my particular case it's the mysql general log and slow query log; neither is critical to operations, just there for troubleshooting if need be, and mysql doesn't have a mechanism for rolling or truncating either of them. These logs can grow ridiculously large if neglected. Is there a nice little cron-job+bash-script hack for rolling or truncating these files? Thanks.

link|improve this question

The references to cron, etc. imply *nix but please add the appropriate tag so we don't have to guess. – John Gardeniers Oct 22 '09 at 21:11
feedback

1 Answer

up vote 3 down vote accepted

Assuming Linux/Unix, logrotate

See: http://www.cyberciti.biz/faq/how-do-i-rotate-log-files/

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.