Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Server Log Rotate Feature and Mac's
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="timgolding" data-source="post: 827799" data-attributes="member: 68501"><p>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</p><p></p><p>[CODE]</p><p>logrotate daily.out</p><p>[/CODE]</p><p></p><p>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:</p><p></p><p></p><p></p><p>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?</p></blockquote><p></p>
[QUOTE="timgolding, post: 827799, member: 68501"] 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 [/CODE] 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: 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? [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Server Log Rotate Feature and Mac's
Top