rm -rf -Mitigating the dangers
odhiambo at gmail.com
Sun Apr 17 19:32:48 UTC 2016
On 17 April 2016 at 20:36, Polytropon <freebsd at edvax.de> 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
> > 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"?
> 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:-)
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft."
More information about the freebsd-questions