From owner-freebsd-questions Sun Mar 5 9:57:46 2000 Delivered-To: freebsd-questions@freebsd.org Received: from fh106.infi.net (fh106.infi.net [209.97.16.33]) by hub.freebsd.org (Postfix) with ESMTP id 9C95937BAA6 for ; Sun, 5 Mar 2000 09:57:36 -0800 (PST) (envelope-from bsdbox@citizen.infi.net) Received: from citizen.infi.net (pm1-42.w66.infi.net [208.130.33.42]) by fh106.infi.net (8.8.8/8.8.8) with ESMTP id MAA31723; Sun, 5 Mar 2000 12:57:31 -0500 (EST) Message-ID: <38C2A00E.3C0EA4FF@citizen.infi.net> Date: Sun, 05 Mar 2000 12:57:34 -0500 From: Scott Gregory X-Mailer: Mozilla 4.7 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: courtney@whtz.com Cc: questions@FreeBSD.ORG Subject: Re: using date for file names References: <85256899.005BCA3F.00@mail.whtz.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Use something like the following: TODAY=`date +%Y%m%d` # Set today to YYYYMMDD mv your.file $TODAY.doc man date for other output formats. I would recommend using the format above since it allows you to easily list files by date without relying on the datestamp of the file. Scott courtney@whtz.com wrote: > > hey everyone- > > I am looking to rename a file on a nightly basis with the current date > (i.e. original.txt will become 030500.doc at midnight tonight) and so > on...what command do I have to use in my shell script to get this working?? > > thanks! > > bern > > Bernie Courtney > Z100 New York Engineering > mailto:courtney@whtz.com > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message