From owner-freebsd-questions Thu Jan 23 5:57:49 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 18A2C37B401 for ; Thu, 23 Jan 2003 05:57:48 -0800 (PST) Received: from mail.seekingfire.com (coyote.seekingfire.com [24.72.10.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5B99B43F18 for ; Thu, 23 Jan 2003 05:57:47 -0800 (PST) (envelope-from tillman@seekingfire.com) Received: from blues.seekingfire.prv (blues.seekingfire.prv [192.168.23.211]) by mail.seekingfire.com (Postfix) with ESMTP id 2F6C3805 for ; Thu, 23 Jan 2003 07:57:41 -0600 (CST) Received: (from tillman@localhost) by blues.seekingfire.prv (8.11.6/8.11.6) id h0NE12716341 for freebsd-questions@FreeBSD.ORG; Thu, 23 Jan 2003 08:01:02 -0600 Date: Thu, 23 Jan 2003 08:01:02 -0600 From: Tillman To: freebsd-questions@FreeBSD.ORG Subject: Re: recover overwritten file Message-ID: <20030123080101.A14879@seekingfire.com> References: <3E2F7415.4030807@datastorm.kicks-ass.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from list@zettai.net on Thu, Jan 23, 2003 at 08:27:05AM -0500 X-Urban-Legend: There is lots of hidden information in headers 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 On Thu, Jan 23, 2003 at 08:27:05AM -0500, george donnelly wrote: > [talon commented on 1/22/03 11:48 PM] > > ----------------------------------------------------------------------------- > > Iv been there :) > > > > This probably sounds stupid but i do it ... > > > > file name /bin/rmx > > > > #/bin/sh > > cp $1 /tmp/`$1` > > rm -r $1 > > > > I call it the recycle bin LoL > > Thanks for everyone's comments. I got mighty lucky as I had a 5 minute old > copy of the file hanging around on another disk. And as someone mentioned, I > did learn a very important lesson. Wow. > > btw I think your recycle bin is a good idea and am going to implement it. You might want to look at the "Removing Files" chapter of _Unix Power Tools_ (published by O'Reilly). In the 2nd edition there is a discussion on thsi topic on page 404, and I believe the 3rd edition has it as well. The example given there is an alias instead of a script: 'alias del "mv \!* ~/trash"'. A cron job to empty that directory periodically is recommended. There's a couple of problems with the idea which are mentioned in the text. Aside from the technical problems, though, I'd be leery of training myself to think of deletion as something safe enough to do without considering the consequences :-) -T -- A world is supported by four things: the teaming of the wise, the justice of the great, the prayers of the righteous, and the valor of the brave. But all of these are as nothing without a ruler who knows the art of ruling. - Prince Raphael Corrino, Discourses on Galactic Leadership To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message