From owner-freebsd-questions@FreeBSD.ORG Sun Jul 24 05:16:56 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 318CC16A41F for ; Sun, 24 Jul 2005 05:16:56 +0000 (GMT) (envelope-from m@MHoerich.de) Received: from mail.gmx.net (pop.gmx.de [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 5A94D43D45 for ; Sun, 24 Jul 2005 05:16:54 +0000 (GMT) (envelope-from m@MHoerich.de) Received: (qmail invoked by alias); 24 Jul 2005 05:16:52 -0000 Received: from p548B5ED7.dip.t-dialin.net (EHLO localhost) [84.139.94.215] by mail.gmx.net (mp021) with SMTP; 24 Jul 2005 07:16:52 +0200 X-Authenticated: #5114400 Date: Sun, 24 Jul 2005 07:16:48 +0200 From: Mario Hoerich To: aj@siegel-tech.net Message-ID: <20050724051648.GA4119@Pandora.MHoerich.de> References: <20050721070434.254A11D930@imss.sgp.fujixerox.com> <200507231250.16501.bulk_mail@siegel-tech.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200507231250.16501.bulk_mail@siegel-tech.net> User-Agent: Mutt/1.4.2.1i X-Y-GMX-Trusted: 0 Cc: freebsd-questions@freebsd.org Subject: Re: undelete in FreeBSD? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2005 05:16:56 -0000 # Aaron Siegel: [ there is no un-rm ] > > One option I have seen for creating your own restore is to create a script > that will move files you want to delete to a temporary directory, a "Trash > Bin". Then use your shells aliases to alias the script to the rm command. Don't *ever* create aliases for rm(1). rm's sole purpose in life is to destroy files. If you tame it, you'll eventually adapt and rm with less caution. There are lots of people who eventually got bitten by that when working on a machine other than their own. A better way is to use a name like "[tT]rash" or "tt" (=[move] to trash). That way, when working on a machine without your script, you'll get a nice and friendly "command not found" reminding you there's no safety catch. I'm personally none too fond of this, though. Unixoid systems have quite a lot of ways to destroy files. Trashes won't really protect you from that. Instead, they just give you a false feeling of security, which merely encourages sloppiness. My own solution is actually quite simple: I treat dangerous commands the same way I'd carry a deadly and pretty annoyed snake: with my thoughts on the task at hand. I read the command *before* I hit enter. Not the one I *think* I've written, but the one I'm about to execute. I also tend to tab-expand globs to see which files are actually affected. YMMV, though. Cheers, Mario