[patch] rm can have undesired side-effects
killing at multiplay.co.uk
Sun Oct 29 23:58:08 UTC 2006
----- Original Message -----
From: "Joerg Pernfuss" <elessar at bsdforen.de>
>> I guess that it can be fixed (in case it is not desired) by:
>> - Ignoring the -P option when the link count is greater then one, or
> Silently ignoring user specified options is seldom a good way to go.
> The user explicitly stated he wants to wipe the file contents.
That maybe the case but does rm -f <file> remove all copies?
Nope so its behaviour is safe even with multiple hardlinks.
>From the description I've seen thats not the case for -P
here and as such I dont think its quite a simple as that.
My personal preference would be for it to warn or perhaps
error if the link count is not zero. Possibly use -f to
override this but even that I'd say is dangerous.
This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it.
In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337
or return the E.mail to postmaster at multiplay.co.uk.
More information about the freebsd-hackers