From: Alex Efros <powerman@sky.net.ua>
Subject: Re: svlogd -tt
Date: Thu, 29 Jul 2004 02:02:01 +0300 [thread overview]
Message-ID: <20040728230201.GM22412@home.power> (raw)
In-Reply-To: <40FD6BB6.5000902@zweipol.net>
Hi!
You all discuss very complex things... patches... :) probably I misunderstand
this issue, but I think we already have everything we need in file timestamp,
and there is no need to convert logfile names from TAI.
If you want to select logfile name based on localtime just list directory:
home /var/log/qmail/qmail-send # ls -o
total 17494
-rw-r--r-- 1 qmaill 411 Feb 21 17:57 @4000000040378031026453dc.u
-rw-r--r-- 1 qmaill 173932 Feb 23 11:02 @400000004039c4611fadac2c.u
-rw-r--r-- 1 qmaill 1024279 Mar 2 10:32 @400000004044a95f0f120e1c.u
...skip....
-rw-r--r-- 1 qmaill 542 Jul 8 18:39 @4000000040ed6b2734067d34.u
-rw-r--r-- 1 qmaill 741472 Jul 23 00:45 @40000000410039f317fab1dc.u
-rwxr--r-- 1 qmaill 2499038 Jul 26 21:07 @400000004105486f30840564.s
-rw-r--r-- 1 root 12 Feb 20 18:00 config
-rw-r--r-- 1 qmaill 683653 Jul 29 01:45 current
-rw------- 1 qmaill 0 Feb 16 03:04 lock
-rw-r--r-- 1 qmaill 0 Feb 16 03:04 state
home /var/log/qmail/qmail-send #
and then copy/paste needed logfile name using mouse.
On Tue, Jul 20, 2004 at 09:00:06PM +0200, Henrik Heil wrote:
> i read the thread about the svlogd -t switches some weeks ago and though
> i am using -tt (UTC) happily i am missing the feature to have the
> rotated logfiles with UTC-names instead of @TAI-names.
>
> Is there a drawback to make this an option?
> The order of the logfiles would be preserved, selecting logfiles with
> wildcards would be easy.
If you want to select group of logfiles based on localtime you can do a
number of tricks, for example:
home /var/log/qmail/qmail-send # find -name '@*' -mtime -7 -daystart -exec ls -o {} \;
-rw-r--r-- 1 qmaill 741472 Jul 23 00:45 ./@40000000410039f317fab1dc.u
-rwxr--r-- 1 qmaill 2499038 Jul 26 21:07 ./@400000004105486f30840564.s
home /var/log/qmail/qmail-send #
you can use any sort of command instead of 'ls -o' for apply to all logfiles
for a last week (-mtime -7).
If you really-really need to have localtime 'wildcards' you do something like
this:
home /var/log/qmail/qmail-send # ls -o | grep 'Jun 15 19:'
-rw-r--r-- 1 qmaill 19540 Jun 15 19:27 @4000000040cf23f91d3bf0ac.u
-rw-r--r-- 1 qmaill 4334 Jun 15 19:45 @4000000040cf2a0f19b638d4.u
-rw-r--r-- 1 qmaill 57 Jun 15 19:55 @4000000040cf2ad33559015c.u
home /var/log/qmail/qmail-send # ls -o | grep 'Jun 15 19:' | cut -b 48-
@4000000040cf23f91d3bf0ac.u
@4000000040cf2a0f19b638d4.u
@4000000040cf2ad33559015c.u
home /var/log/qmail/qmail-send #
Is there tricks help?
--
WBR, Alex.
next prev parent reply other threads:[~2004-07-28 23:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-20 19:00 Henrik Heil
2004-07-23 10:20 ` Gerrit Pape
2004-07-23 10:30 ` Ian Stokes-Rees
2004-07-26 18:39 ` Henrik Heil
2004-07-27 11:28 ` Gerrit Pape
2004-07-27 12:31 ` Henrik Heil
2004-07-28 23:02 ` Alex Efros [this message]
2004-07-29 10:12 ` Henrik Heil
2004-07-29 11:12 ` Alex Efros
2004-07-29 13:07 ` Henrik Heil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040728230201.GM22412@home.power \
--to=powerman@sky.net.ua \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).