From owner-freebsd-chat Wed Mar 13 0:10:28 2002 Delivered-To: freebsd-chat@freebsd.org Received: from durendal.skynet.be (durendal.skynet.be [195.238.3.128]) by hub.freebsd.org (Postfix) with ESMTP id 5C28637B498 for ; Wed, 13 Mar 2002 00:10:09 -0800 (PST) Received: from [10.0.1.9] (ip-27.shub-internet.org [194.78.144.27] (may be forged)) by durendal.skynet.be (8.11.6/8.11.6/Skynet-OUT-2.16) with ESMTP id g2D89UM00297; Wed, 13 Mar 2002 09:09:31 +0100 (MET) (envelope-from ) Mime-Version: 1.0 X-Sender: bs663385@pop.skynet.be Message-Id: In-Reply-To: <20020313074829.GC375@hades.hell.gr> References: <200203130057.TAA27975@uce55.uchaswv.edu> <20020313074829.GC375@hades.hell.gr> X-Grok: +++ath X-WebTV-Stationery: Standard; BGColor=black; TextColor=black Reply-By: Wed, 1 Jan 1984 12:34:56 +0100 X-Message-Flag: Outlook : A program to spread viri via e-mail. Try Eudora (http://www.eudora.com/), mutt (http://www.mutt.org/), or pine (http://www.washington.edu/pine/). But please, get something other than Outlook. Date: Wed, 13 Mar 2002 09:09:08 +0100 To: Giorgos Keramidas , Nathan Mace From: Brad Knowles Subject: Re: backups of log files Cc: freebsd-chat@freebsd.org Content-Type: text/plain; charset="us-ascii" ; format="flowed" Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org At 9:48 AM +0200 2002/03/13, Giorgos Keramidas wrote: > You will probably want to have the day of month and month to have two > digits, later on. As others have pointed out -questions is the best place > for general FreeBSD questions, but here's a snippet that you might find > interesting: > > use POSIX; > $s = strftime("%d.%m.%Y", localtime()); > print "$s\n"; You should swap the order of year, month, and day, so that the files will automatically sort into the proper date order when you 'ls' them. Moreover, now you can claim that your program is ISO-compliant with regards to handling dates. ;-) -- Brad Knowles, Do you hate Microsoft? Do you hate Outlook? Then visit the Anti-Outlook page at and see how much fun you can have. "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin, Historical Review of Pennsylvania. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message