[NTLUG:Discuss] Logrotate...
Fred James
fredjame at concentric.net
Sun Jan 6 17:16:09 CST 2002
Thank you for your reply. I run Red Hat, and so I was able to find
"logrotate" and read all about it - and I think it is pretty nifty, if
you are running Red Hat.
The fourth tenet of "The UNIX Philosophy" (Mike Gancarz) is "Choose
portability over efficiency", and I face a fair number of non Red Hat
systems. I could spend my time making them all BASH (and perhaps Red
Hat) compatible, but the owners would want justification, and if any of
the critical software failed, the first thing support wants to know is
what changed - I like "logrotate" but I don't think I'll port it.
GWH Technical Training wrote:
> Correct...
> It lives under /usr/sbin/logrotate on the RedHat side.
> The source RPM can be found on Disk 2 of 2 of the RedHat 7.2 Source Code CD,
> and is listed as logrotate-3.5.9-1.src.rpm. From this , you should be
> able to compile it on whatever unix system you would like. I assume
> that FreeBSD and others have something similiar.
>
> Gotta love opensource...
>
> g
>
>
>
>
> Fred James wrote:
>
>
>>So, are you saying it is standard on Red Hat, and downloadable to other
>>*nix's (other distributions of Linux, Solaris, and perhaps SVR4 and BSD
>>derivatives)?
>>
>>GWH Technical Training wrote:
>>
>>
>>>Logrotate, although not included with the primary system of Solaris, has been available for download at least back as far as Solaris 2.6. It should be able to be downloaded from sunfreeware.com. Pretty much the same
>>>functionality as what you have in RH.
>>>
>>>Hope this helps...
>>>
>>>Gary
>>>
>>>
>>>
>>>
>>>
>>>
>>>Fred James wrote:
>>>
>>>
>>>
>>>>Don't get me wrong - that is a very interesting little gizmo, and one
>>>>which I may find very useful, too.
>>>>
>>>>The credit lines at the end of the man page read: "Author, Erik Troan
>>>><ewt at redhat.com>" - I haven't found logrotate on any of the other UNIXs
>>>>I work with, is it on distributions of Linux other than Red Hat?
>>>>
>>>>sysmail at glade.net wrote:
>>>>
>>>>
>>>>
>>>>>Wouldn't logrotate do all this a lot easier?
>>>>>
>>>>>Just a thought,
>>>>>
>>>>>Carl
>>>>>
>>>>>On Fri, 4 Jan 2002, Paul Ingendorf wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>Date: Fri, 4 Jan 2002 23:40:18 -0600
>>>>>>From: Paul Ingendorf <pauldy at wantek.net>
>>>>>>Reply-To: discuss at ntlug.org
>>>>>>To: discuss at ntlug.org
>>>>>>Subject: RE: [NTLUG:Discuss] Script question
>>>>>>
>>>>>>hmm shell scripts yum gotta throw in how I would do it even though I see a few fine examples have already been posted.
>>>>>>The following would also move the files appropriately. Just copy and paste this in a file chmod +x it and remember to create the new backup file as /archive/domains.`date +%Y-%m-%d` and it should work properly every time.
>>>>>>
>>>>>>#!/bin/bash
>>>>>>rm -f /archive/*.3
>>>>>>let x=3
>>>>>>for file in /archive/domains.[0-9][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9].[0-3]
>>>>>> do
>>>>>> mv $file /archive/`echo $file | sed -e "s/\.[0-9]^//g"`.$x
>>>>>> let x=$x-1
>>>>>> done
>>>>>>mv /archive/domains.`date +%Y-%m-%d` /archive/`date +%Y-%m-%d`.0
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>_______________________________________________
>>>>>http://www.ntlug.org/mailman/listinfo/discuss
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>--
>>>>...make every program a filter...
>>>>
>>>>_______________________________________________
>>>>http://www.ntlug.org/mailman/listinfo/discuss
>>>>
>>>>
>>>+Ûiÿü0Â{eº
>>>+fùs(S(Ys(Y"ùb²Ø§~?ÝS(Ç.ss==
>>>
>>>
>>--
>>...make every program a filter...
>>
>>_______________________________________________
>>http://www.ntlug.org/mailman/listinfo/discuss
>>
> +Ûiÿü0Â{eº
> +fùs(S(Ys(Y"ùb²Ø§~?ÝS(Ç.ss==
>
--
...make every program a filter...
More information about the Discuss
mailing list