-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Philip Rowlands on 8/21/2007 3:30 PM: > On Tue, 21 Aug 2007, Eric Blake wrote: > >> $ ln -vf a/f b/f c >> `c/f' => `a/f' >> `c/f' => `b/f' >> $ cat c/f >> 2 >> >> Oops - we overwrote the just-created c/f with a link to b/f. > > But you told it to, with -f.
But that is exactly what we told cp to do with --remove-destination. And strictly speaking, it is also what POSIX requires for 'mv -f', but as you can see: $ mkdir a b c $ echo 1 > a/f $ echo 2 > b/f $ mv -fv a/f b/f c `a/f' -> `c/f' mv: will not overwrite just-created `c/f' with `b/f' > Doesn't POSIX require this to succeed? Only if it also requires the same for mv and cp. And Jim Meyering has a pending aardvark with the Austin Group to make sure the next revision of POSIX allows GNU's behavior: it is nice to rely on the GNU assumption that cp, ln, and mv should never be able to lose user data due to collisions in the destination. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGy15i84KuGfSFAYARAltBAKDLXUlLFswzXIDd3WvBTsmOcXi3VgCePsw3 5nXS8vwhL7ki3ROC+Rl47f0= =+qr+ -----END PGP SIGNATURE----- _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils