Date: Sat, 07 Jul 2001 10:21:47 +0200 From: dirk.meyer@dinoex.sub.org (Dirk Meyer) To: freebsd-stable@FreeBSD.ORG Subject: Re: Suggestion for newsyslog.c Message-ID: <iwlhw03QFP@dmeyer.dinoex.sub.org> References: <200107070131.SAA208868@blah.incyte.com> <5.1.0.14.2.20010706204719.021f8540@216.67.14.69> <200107070131.SAA208868@blah.incyte.com> <20010706215402.E401@hal9000.servehttp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Andrew J Caines schrieb:,
> While this sounds ambitious, I would hope that code could be swiped from
> date(1) and/or other utilities and incorporated without great difficulty.
> At a pinch, you could just call date.
strftime does all the magic work for us,
but I don't know how to tweek it in the configuration file.
Wiout top break the syntax with older entrys.
> Oh, while you're at it, how about doing it in perl so I can slap it on my
> Solaris boxes?
I uses a shell/awk mix to do this on some machines :)
$ ls /var/log/*.0 | awk '{print "mv " $1 " " substr( $1, 1, index( $1, ".0" ) ) strftime("%Y-%M-%d")}'
kind regards Dirk
- Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?iwlhw03QFP>
