Protection from the dreaded "rm -fr /"
Ceri Davies
ceri at submonkey.net
Sat Oct 2 04:22:55 PDT 2004
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."
> 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
--
It is not tinfoil, it is my new skin. I am a robot.
-------------- 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/cb4c364b/attachment.bin
More information about the freebsd-hackers
mailing list