From owner-freebsd-questions@freebsd.org Sun Apr 17 19:32:48 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20F98B102F5 for ; Sun, 17 Apr 2016 19:32:48 +0000 (UTC) (envelope-from odhiambo@gmail.com) Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AF3141F74 for ; Sun, 17 Apr 2016 19:32:47 +0000 (UTC) (envelope-from odhiambo@gmail.com) Received: by mail-wm0-x22c.google.com with SMTP id v188so92952496wme.1 for ; Sun, 17 Apr 2016 12:32:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=s7WYaj2Sl5k8ljvgEa6HW7Ugyf3FKvhnnyfwg5sgkOo=; b=dgPC8X92e+3ctAyx9cMuWq22JlCWrGiykouv6miH21Rqly1xmMiNlh/Q0qctpysuwO tVWDb+hSwPKFsbJRV4MekT0R21fVhrdgxQ4mazWm8wgiWW5O2ak26mILPmfKBAj0n/rF vhb8Vt6Bueg+lDdYc3kDsSWP7fMIPwtAijag3YqEpcDwnpcOlxdKjOzq+CjZx+6xeXY7 ZGlpx6n4rAaOgxAYboarA0o1S0Em6a62aP1iLOgvvA3DhKI+dRgaKVbWvVC88Lk9+5Je Deloe0V4F0OC04kXAkg8tZwd6kRy04lNyohrtuLH+85xOIrBFl2fn8BzSVbw1SC3h5X1 vG/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=s7WYaj2Sl5k8ljvgEa6HW7Ugyf3FKvhnnyfwg5sgkOo=; b=EU7mhVLzU+qKYYlL8/aD8gk2XirH4RdyVYiTB0iPa5ZXqPWmNUP2+v73tF3aZYRBhB 8K9KfL4V9mSmLoO7r/+PSNchEATEi9c5gna1z7TUdgspp7lYQgyd2maMguEXpaRcUEWB xsZz6j48kLe2FeLq9DWxk31j+cdzuBP4QbnihLRT+NsjtHPAOuCZ7WF2h/RKXd5KL4G+ pEpi0YapxJQysjxMiDjP9y32SBYhw/yftWbcXb4u39YO+csxdY39+ohPWlinHiFi59aQ SyAEoyQP74fJ3yEc9RdXyFBePyr6nEC1oiWKMWuIjcA4qV9nkAO2Ds+ignTT1uyY1iFH EZQw== X-Gm-Message-State: AOPr4FXRbVn+xySKnpUdEJl+y2u/Z7QiZyQxiPKTif5tyLIWQiPZdepfHQXtEO8j3JVZads/a7XDcbe6v/hbtg== X-Received: by 10.194.61.19 with SMTP id l19mr14686wjr.4.1460921566362; Sun, 17 Apr 2016 12:32:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.103.233 with HTTP; Sun, 17 Apr 2016 12:32:06 -0700 (PDT) In-Reply-To: <20160417193610.b5437205.freebsd@edvax.de> References: <20160417193610.b5437205.freebsd@edvax.de> From: Odhiambo Washington Date: Sun, 17 Apr 2016 22:32:06 +0300 Message-ID: Subject: Re: rm -rf -Mitigating the dangers To: Polytropon Cc: User Questions Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Apr 2016 19:32:48 -0000 On 17 April 2016 at 20:36, Polytropon wrote: > On Sun, 17 Apr 2016 20:10:11 +0300, Odhiambo Washington wrote: > > With great power comes great responsibility and as such I think there > > should be a wrapper around rm to warn sysadmins that what they are about > to > > do with -rf is dangerous, yes? > > If you see that the command line contains -f, "force", then you > should already know what you're doing, as you're _intendedly_ > avoiding any safety belts. A person _responsible_ for a system > who starts entering the "rm" command line should know what he's > doing, especially when operating in an environment where the > command line is being used (instead of a TUI or GUI file manager > that makes it less easier to do something stupid). > > But no matter what you do, there simply is no universal protection > against fat fingers, lazy eyes, and tired brain cells. I know what > I'm talking about. ;-) > > > > > Read input from sysadmin 3 times, looking strictly for their confirmation > > before effecting the `rm -rf`. > > Lazy sysadmins annoyed by this security measure will write a > wrapper around it, call it "rm", and make sure the command line > arguments are provided three times identically. Problem solved. :-) > > A nice idea is to use "echo" instead of "rm" first, and check the > output, if that is _really_ what you want to delete, and then, > and _only then_, replace "echo" with "rm". > > > > > Could it be that what I am smoking/drinking is the issue here or I have > > your support? LOL > > Is this because of the recent "rm -rf hoax"? > > > http://serverfault.com/questions/587102/monday-morning-mistake-sudo-rm-rf-no-preserve-root > > > http://meta.serverfault.com/questions/8696/what-to-do-with-the-rm-rf-hoax-question > > Because people love car analogies... we don't have spikes in the > streets infront of traffic lights that empty the tires of a driver > who wants to surpass the red light, and forcing him to exchange > the tires when he _insists_ on crossing the red light doesn't make > the idea any better. :-) > > I love your radical views, ever since:-) -- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft."