From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 3 03:12:13 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB1DC16A4CE for ; Sun, 3 Oct 2004 03:12:13 +0000 (GMT) Received: from mail.seekingfire.com (coyote.seekingfire.com [24.72.10.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id C38DE43D3F for ; Sun, 3 Oct 2004 03:12:13 +0000 (GMT) (envelope-from tillman@seekingfire.com) Received: by mail.seekingfire.com (Postfix, from userid 500) id 7DE8A2D6; Sat, 2 Oct 2004 21:12:13 -0600 (CST) Date: Sat, 2 Oct 2004 21:12:13 -0600 From: Tillman Hodgson To: freebsd-hackers@freebsd.org Message-ID: <20041003031213.GW35869@seekingfire.com> References: <200410030154.i931sR348272@lakes.dignus.com> <20041002201312.E90087-100000@mxb.saturn-tech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041002201312.E90087-100000@mxb.saturn-tech.com> X-Habeas-SWE-1: winter into spring X-Habeas-SWE-2: brightly anticipated X-Habeas-SWE-3: like Habeas SWE (tm) X-Habeas-SWE-4: Copyright 2002 Habeas (tm) X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this X-Habeas-SWE-6: email in exchange for a license for this Habeas X-Habeas-SWE-7: warrant mark warrants that this is a Habeas Compliant X-Habeas-SWE-8: Message (HCM) and not spam. Please report use of this X-Habeas-SWE-9: mark in spam to . X-GPG-Key-ID: 828AFC7B X-GPG-Fingerprint: 5584 14BA C9EB 1524 0E68 F543 0F0A 7FBC 828A FC7B X-GPG-Key: http://www.seekingfire.com/gpg_key.asc X-Urban-Legend: There is lots of hidden information in headers User-Agent: Mutt/1.5.6i Subject: Re: Protection from the dreaded "rm -fr /" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Oct 2004 03:12:14 -0000 On Sat, Oct 02, 2004 at 08:14:18PM -0600, Doug Russell wrote: > > On Sat, 2 Oct 2004, Thomas David Rivers wrote: > > > If I'm remembering correctly - the historical way to > > do this is to alias the "rm" command to something that > > else that checks the arguments and complains appropriately > > (and then executes /bin/rm.) Typically with just a shell > > This would be a much, much better approach. For those cases where what is being removed makes sense, I agree. / is a special case, I maintain that the behaviour of `rm -rf` is, by necessity, undefined and unpredictable. `rm` shouldn't be allowed to do it any more than 'rm' should be used to remove user accounts simply because they both invovle "removing" something. Newfs is the tool for the job in this case. -T -- "Great spirits have always found violent opposition from mediocrities. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." -- Albert Einstein