From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 3 01:54:08 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 DB98C16A4CE; Sun, 3 Oct 2004 01:54:08 +0000 (GMT) Received: from dignus.com (client196-2.dsl.intrex.net [209.42.196.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 72D2843D2F; Sun, 3 Oct 2004 01:54:08 +0000 (GMT) (envelope-from rivers@dignus.com) Received: from lakes.dignus.com (lakes.dignus.com [10.1.0.3]) by dignus.com (8.12.9p2/8.12.9) with ESMTP id i931rsdT018045; Sat, 2 Oct 2004 21:53:54 -0400 (EDT) (envelope-from rivers@dignus.com) Received: (from rivers@localhost) by lakes.dignus.com (8.11.6/8.11.3) id i931sR348272; Sat, 2 Oct 2004 21:54:27 -0400 (EDT) (envelope-from rivers) Date: Sat, 2 Oct 2004 21:54:27 -0400 (EDT) From: Thomas David Rivers Message-Id: <200410030154.i931sR348272@lakes.dignus.com> To: drosih@rpi.edu, freebsd-hackers@freebsd.org, keramida@freebsd.org In-Reply-To: <20041002230226.GC1381@gothmog.gr> X-Spam-Status: No, hits=-5.6 required=5.0 tests=AWL,BAYES_01,IN_REP_TO version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: missive@hotmail.com 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 01:54:09 -0000 Everyone, 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 alias. That keeps you from accidently doing something. Just thinking that putting extra "smarts" into a utility isn't the typical "UNIXy" way to do this. Let each tool do the one thing it does really well.. 'rm' removes; let it remove. I think, in the old "UNIX Review" magazine (what - almost 15+ years ago now?) There was a couple of examples of this. - Dave Rivers - -- rivers@dignus.com Work: (919) 676-0847 Get your mainframe programming tools at http://www.dignus.com