Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Oct 2004 21:12:13 -0600
From:      Tillman Hodgson <tillman@seekingfire.com>
To:        freebsd-hackers@freebsd.org
Subject:   Re: Protection from the dreaded "rm -fr /"
Message-ID:  <20041003031213.GW35869@seekingfire.com>
In-Reply-To: <20041002201312.E90087-100000@mxb.saturn-tech.com>
References:  <200410030154.i931sR348272@lakes.dignus.com> <20041002201312.E90087-100000@mxb.saturn-tech.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041003031213.GW35869>