From owner-freebsd-stable Sat Jul 7 1:25:51 2001 Delivered-To: freebsd-stable@freebsd.org Received: from net2.dinoex.sub.org (net2.dinoex.de [212.184.201.182]) by hub.freebsd.org (Postfix) with ESMTP id 4451937B405 for ; Sat, 7 Jul 2001 01:25:41 -0700 (PDT) (envelope-from dirk.meyer@dinoex.sub.org) Received: from gate.dinoex.sub.org (dinoex@localhost) by net2.dinoex.sub.org (8.11.4/8.11.3) with BSMTP id f678P3f17660 for ; Sat, 7 Jul 2001 10:25:03 +0200 (CEST) (envelope-from dirk.meyer@dinoex.sub.org) X-MDaemon-Deliver-To: To: freebsd-stable@FreeBSD.ORG Message-ID: From: dirk.meyer@dinoex.sub.org (Dirk Meyer) Organization: privat Subject: Re: Suggestion for newsyslog.c Date: Sat, 07 Jul 2001 10:21:47 +0200 X-Mailer: Dinoex 1.77 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> X-Gateway: ZCONNECT gate.dinoex.sub.org [UNIX/Connect 0.91] X-Accept-Language: de,en X-PGP-Fingerprint: 44 16 EC 0A D3 3A 4F 28 8A 8A 47 93 F1 CF 2F 12 X-Noad: Please don't send me ad's by mail. I'm bored by this type of mail. X-Copyright: (C) Copyright 1999 by Dirk Meyer -- All rights reserved. X-Note: sending SPAM is a violation of both german and US law and will at least trigger a complaint at your provider's postmaster. X-PGP-Key-Avail: mailto:pgp-public-keys@keys.de.pgp.net Subject:GET 0x331CDA5D X-No-Archive: yes X-ZC-VIA: 20010707000000S+2@dinoex.sub.org Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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