From owner-freebsd-questions Mon Feb 10 9: 0:58 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D8FA137B40B for ; Mon, 10 Feb 2003 09:00:56 -0800 (PST) Received: from web1.nexusinternetsolutions.net (web1.nexusinternetsolutions.net [206.47.131.12]) by mx1.FreeBSD.org (Postfix) with SMTP id C08FE43F85 for ; Mon, 10 Feb 2003 09:00:55 -0800 (PST) (envelope-from dave@hawk-systems.com) Received: (qmail 93424 invoked from network); 10 Feb 2003 17:00:54 -0000 Received: from unknown (HELO ws1) (24.157.103.51) by web1.nexusinternetsolutions.net with SMTP; 10 Feb 2003 17:00:54 -0000 From: "Dave [Hawk-Systems]" To: "Doug Poland" , Cc: Subject: RE: shell script to backup files with datestamp Date: Mon, 10 Feb 2003 12:00:53 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 In-Reply-To: <49206.63.104.35.130.1044895695.squirrel@email.polands.org> Importance: Normal Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >From: Doug Poland >Jack L. Stone said: >>> At 11:19 AM 2.10.2003 -0500, Dave [Hawk-Systems] wrote: >>> Without dumping to perl or another external language, would like >>> to accomplish the following; >>> >>> #cp /path/to/file.conf /path/to/file.conf.20030210 >>> >>> I almost want to say this could be done with something simple >>> like >>> >>> #cp /path/to/file.conf /path/to/file.conf.$DATE >> >> If you use "date" as follows, it will take it out to the month, >> day, hour and minute >> >> cp ../file.conf`date +".%m.%d.%H.%M"` >> >> ...will give: >> file.conf.02.06.04.45 >> >I suggest spending an hour or two learning RCS. You'll have >history, rollback, tags, and much more with a real revision control >system. RCS is not at all hard to learn with basic checkin (ci) >checkout (co) >and diff (rcsdiff) commands. Any time you spend learning RCS will >help if you later have to move to CVS for a distributed solution. Thanks to both for the solutions... The short-term fix by Jack is exactly what I was looking for... but for long term use I really like the potential that RCS has (was never aware that function existed). Will definately be spending some time with that and likely be moving to that in the future. Thanks again. Dave To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message