Date: Thu, 23 Jan 2003 08:01:02 -0600 From: Tillman <tillman@seekingfire.com> To: freebsd-questions@FreeBSD.ORG Subject: Re: recover overwritten file Message-ID: <20030123080101.A14879@seekingfire.com> In-Reply-To: <BA5557D9.19B3D%list@zettai.net>; from list@zettai.net on Thu, Jan 23, 2003 at 08:27:05AM -0500 References: <3E2F7415.4030807@datastorm.kicks-ass.org> <BA5557D9.19B3D%list@zettai.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030123080101.A14879>