Protection from the dreaded "rm -fr /"
Tillman Hodgson
tillman at seekingfire.com
Sat Oct 2 09:55:37 PDT 2004
On Sat, Oct 02, 2004 at 04:48:46PM +0200, Dimitry Andric wrote:
> Of course, your work is commendable, but isn't is much simpler to just
> not type commands like that? I mean, "rm -rf /etc" or "rm -rf /bin"
> are just as bad, but do you really want to be checking for all
> possible `bad' deletions? That way, we'll start to look like some
> software from Redmond... :)
`rm -rf /etc` works the way one would expect (removes the etc branch of
the filesystem tree). `rm -rf /` is a special case -- it's unlikely to
succeed. Additionally, it's a common typo.
If it doesn't do what an admin expects, and it's a common typo, removing
the ability for it to fail by removing the ability for it to be used
makes a lot of sense to me.
-T
--
Wisdom is not communicable. The wisdom which a wise man tries to communicate
always sounds foolish.
Hermann Hesse
More information about the freebsd-hackers
mailing list