Protection from the dreaded "rm -fr /"

Max Laier max at love2party.net
Sat Oct 2 04:51:27 PDT 2004


On Saturday 02 October 2004 13:22, Ceri Davies wrote:
> On Sat, Oct 02, 2004 at 11:23:52AM +0200, Max Laier wrote:
> > [ Sorry to be so negative ... ]
> >
> > At very least you should consider to error out silently as POSIX requires
> > "-f" to be silent. Other than that you should really look into the
> > standards and what they way about rm and friends.
>
> Are you sure?  From the RATIONALE section of
> http://www.opengroup.org/onlinepubs/009695399/utilities/rm.html:
>
>     "It is less clear that error messages regarding files that cannot be
>      unlinked (removed) should be suppressed. Although this is historical
>      practice, this volume of IEEE Std 1003.1-2001 does not permit the -f
>      option to suppress such messages."

Misread - I stand corrected.

> > I am not a fan of providing seat belts like this. People concerned about
> > this, can "alias rm 'rm -i'" etc. etc. Others have commented like this
> > ...
> >
> > If you still have to make this change, make it tuneable with a
> > environment variable (and make it default to off).
>
> I'd prefer that too.
>
> Ceri

-- 
/"\  Best regards,                      | mlaier at freebsd.org
\ /  Max Laier                          | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | mlaier at EFnet
/ \  ASCII Ribbon Campaign              | Against HTML Mail and News
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20041002/2e5bece6/attachment.bin


More information about the freebsd-hackers mailing list