Date: Wed, 13 Mar 2002 09:48:29 +0200 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: Nathan Mace <nmace85@yahoo.com> Cc: freebsd-chat@freebsd.org Subject: Re: backups of log files Message-ID: <20020313074829.GC375@hades.hell.gr> In-Reply-To: <200203130057.TAA27975@uce55.uchaswv.edu> References: <200203130057.TAA27975@uce55.uchaswv.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2002-03-12 19:53, Nathan Mace wrote:
> how can i get it name them backup1.tar or name
> them after the date like 1102.tar for january 1st 2002?? conceptually i can
> list lots of ways to do this, but i guess what i'm asking for is sample perl
> code. i can't seem to find anything that does this in the usual places i
> look. thanks
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";
Giorgos Keramidas FreeBSD Documentation Project
keramida@{freebsd.org,ceid.upatras.gr} http://www.FreeBSD.org/docproj/
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-chat" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020313074829.GC375>
