Server Log Rotate Feature and Mac's

Joined
Sep 24, 2008
Messages
8
Reaction score
0
Points
1
Hi. I have some mac servers. I am trying to clean them up. The disk usage was maxed out. The main reason for this was because of excessive log files. So i decided i need to delete some of the old apache log files. That was not a problem since apache has a built in rotatelogs feature. Next i wanted to rotate some of the other log files. I have one log file daily.out that is 977MB. Kind of ridiculous for a log file. So i tried the logrotate command

Code:
logrotate daily.out

I got this command from a linux forum hoping it would work with Darwin. However it didn't work. It doesn't work on any of my macs. i get the following error:

-bash: logrotate: command not found

Is this normal. Is logrotate something that doesn't come with macs? Is there another command that would achieve this. I need something because eventually i would like to have a cronjob that rotates my logs every so often and deletes old rotated logs. How can i achieve this?
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top