This is a discussion on Re: [patch] rm can have undesired side-effects - FreeBSD ; --9l24NVCWtSuIVIod Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 ...
--9l24NVCWtSuIVIod
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
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
>this change.
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.
--=20
Peter Jeremy
--9l24NVCWtSuIVIod
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)
iD8DBQFFRkg0/opHv/APuIcRAukbAJ9K4uYUcvlcYYxJ3yK65aaOmGqN0gCdFh/w
W7x3Wgznu6+ojtacJGsiw5c=
=S+e2
-----END PGP SIGNATURE-----
--9l24NVCWtSuIVIod--