From owner-freebsd-questions Mon Feb 10 8:19:10 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 DBFDB37B401 for ; Mon, 10 Feb 2003 08:19:08 -0800 (PST) Received: from web1.nexusinternetsolutions.net (web1.nexusinternetsolutions.net [206.47.131.12]) by mx1.FreeBSD.org (Postfix) with SMTP id DDC3343FA3 for ; Mon, 10 Feb 2003 08:19:07 -0800 (PST) (envelope-from dave@hawk-systems.com) Received: (qmail 90089 invoked from network); 10 Feb 2003 16:19:04 -0000 Received: from unknown (HELO ws1) (24.157.103.51) by web1.nexusinternetsolutions.net with SMTP; 10 Feb 2003 16:19:04 -0000 From: "Dave [Hawk-Systems]" To: Subject: shell script to backup files with datestamp Date: Mon, 10 Feb 2003 11:19:04 -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 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 Without dumping to perl or another external language, would like to accomplish the following; prior to making changes in a file, backup incrementially the current file to create a record of changes ans versions. For example. we are about to make changes to file.conf and would like to make a copy of our current file before doing so *without* overwriting previous backup copies #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 which would be the solution if I was using perl, php, or soething else to accomplish the copy of files, but would prefer a simple one liner without having to load another processor just for this one command. Suggestions would be appreciated. Dave To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message