[patch] rm can have undesired side-effects
peterjeremy at optushome.com.au
Mon Oct 30 18:45:23 UTC 2006
On Mon, 2006-Oct-30 17:39:54 +0800, LI Xin wrote:
>Well thought, I think that you are correct that specifying -P should do
>nothing but generate a warning.
>In addition to this I have changed the behavior a bit (patch attached)
>that, if -f is specified along with -P, the overwritten is happen and
>the link would be removed. Please let me know if you are happy with
I prefer this patch to what was committed. It still has foot-shooting
potential but I don't believe that there have been massive screams
about the current -P behaviour so presumably not too many people have
accidently destroyed the content of a file they still wanted when
deleting an unwanted link to the file.
IMHO, rm.1 should explicitly state that "rm -fP" on a multi-linked
file will destry the file contents as seen via the remaining link(s).
This probably belongs in the "NOTE" section.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-all/attachments/20061030/6851d6cc/attachment.pgp
More information about the cvs-all