From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 2 15:42:18 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 F175816A4CE for ; Sat, 2 Oct 2004 15:42:18 +0000 (GMT) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 87E1643D1F for ; Sat, 2 Oct 2004 15:42:18 +0000 (GMT) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (kz63m46dae3mo26d@thor.farley.org [IPv6:2002:4340:5fcd:1::5]) by mail.farley.org (8.12.11/8.12.11) with ESMTP id i92FgHDp009154 for ; Sat, 2 Oct 2004 10:42:17 -0500 (CDT) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (localhost [127.0.0.1]) by thor.farley.org (8.13.1/8.13.1) with ESMTP id i92FgH6D006865 for ; Sat, 2 Oct 2004 10:42:17 -0500 (CDT) (envelope-from sean-freebsd@farley.org) Received: from localhost (sean@localhost)i92FgHqj006862 for ; Sat, 2 Oct 2004 10:42:17 -0500 (CDT) (envelope-from sean-freebsd@farley.org) X-Authentication-Warning: thor.farley.org: sean owned process doing -bs Date: Sat, 2 Oct 2004 10:42:16 -0500 (CDT) From: Sean Farley X-X-Sender: sean@thor.farley.org To: freebsd-hackers@freebsd.org In-Reply-To: <200410021123.59811.max@love2party.net> Message-ID: <20041002102430.Y5481@thor.farley.org> References: <20041002081928.GA21439@gothmog.gr> <200410021123.59811.max@love2party.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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: Sat, 02 Oct 2004 15:42:19 -0000 On Sat, 2 Oct 2004, Max Laier wrote: > At very least you should consider to error out silently as POSIX > requires "-f" to be silent. Other than that you should really look > into the standards and what they way about rm and friends. Personally, I would want it to throw an error for the exit, but I do not know the standard. > I am not a fan of providing seat belts like this. People concerned > about this, can "alias rm 'rm -i'" etc. etc. Others have commented > like this ... Seat belts that prevent a destructive action that may be desired only .0000001% (or much less) of the time do not bother me especially when the action is from a common tool. If the tool was rarely used (i.e., fdisk), or the action was desired much more often, then I could see a complaint about it. I already have that alias; -f overrides -i. It would drive me crazy for it to not override -i. Solaris does not allow -f to override -i and will ask for everything you want to delete recursively. I had to always type '/bin/rm -rf ' to go around this. Highly annoying. > If you still have to make this change, make it tuneable with a > environment variable (and make it default to off). Why not default on? root will not run 'rm -rf /' on purpose very often. Once will be enough. :) Also, when and why would someone want to do this? Sean ----------------------- sean-freebsd@farley.org