Re: [SLE] What does logrotate do?

From: Paul W. Abrahams (abrahams_at_acm.org)
Date: 09/29/04

  • Next message: C Hamel: "Re: [SLE] Sendmail, postfix or msmtp??"
    To: suse-linux-e@suse.com
    Date: Tue, 28 Sep 2004 22:14:33 -0400
    
    

    On Tuesday 28 September 2004 10:00 pm, Patrick Shanahan wrote:
    > * Paul W. Abrahams <abrahams@acm.org> [09-28-04 11:06]:
    > > On Tuesday 28 September 2004 12:03 am, Patrick Shanahan wrote:
    > > > rotate 99 delete 100th file
    > >
    > > That's fine if you want a *collection* of logs with rotation among
    > > them, but I want just a *single* log. Your example, as far as I can
    > > tell, doesn't do truncation; it does deletion of outdated logs. The
    > > logs themselves are never modified. And there's nothing I can find in
    > > the logrotate docs that suggest that logrotate can modify a logfile.
    > > All it can do is rename logs in a set so the old ones disappear as new
    > > ones are created.
    >
    > I gave you the example and you are able to read the manpage but refuse,
    > apparently.
    >
    >
    > from the manpage for logrotate
    >
    >
    > rotate count
    >
    > Log files are rotated <count> times before being removed or
    > mailed to the address specified in a mail directive. If
    > count is 0, old versions are removed rather then rotated.

    "rotate 0" would give you a single logfile, true, but it wouldn't combine that
    with the previous one in any way. The meaning seems to be "throw away the
    current logfile and start a new one". What I'm looking for is "throw away
    all the entries in the logfile that are more than one week old and keep the
    rest", say. I don't think "rotate 0" enables you to do that.

    Looking at it another way, logrotate seems to be indifferent to the actual
    contents of a logfile.

    Paul

    -- 
    Check the headers for your unsubscription address
    For additional commands send e-mail to suse-linux-e-help@suse.com
    Also check the archives at http://lists.suse.com
    Please read the FAQs: suse-linux-e-faq@suse.com
    

  • Next message: C Hamel: "Re: [SLE] Sendmail, postfix or msmtp??"

    Relevant Pages

    • Re: Setting date as filename with logrotate
      ... if all log files changes filename everyday ... >]Im looking for an option to have logrotate rotate each logfile only once, ...
      (comp.os.linux.misc)
    • Re: [SLE] confirming logrotate has occured
      ... I have to rotate those, ... > well as the firewall logs, ... create 640 root root ... I have done 'man logrotate' & the ...
      (SuSE)
    • Re: Squid Logs are not rotating
      ... Logrotate will not rotate logs from one device to another. ... first have logrotate rotate the logs to a tmp directory somewhere on ...
      (Ubuntu)
    • Re: Squid Logs are not rotating
      ... Actually I remarked out the pre-rotate commands and ran the command below ... and the logs rotated successfully. ... Logrotate will not rotate logs from one device to another. ...
      (Ubuntu)
    • Re: Squid Logs are not rotating
      ... Logs still do not rotate automatically, only if I issue the command ... Logrotate will not rotate logs from one device to another. ...
      (Ubuntu)