Re: ln overwrites newly created files

2007-08-23 Thread Jim Meyering
Jim Meyering <[EMAIL PROTECTED]> wrote: > Eric Blake <[EMAIL PROTECTED]> wrote: > >> Contrast the following: >> >> $ mkdir a b c >> $ echo 1 > a/f >> $ echo 2 > b/f >> $ cp -v a/f b/f c --remove-destination >> `a/f' -> `c/f' >> cp: will not overwrite just-created `c/f' with `b/f' >> >> with the si

Re: ln overwrites newly created files

2007-08-22 Thread Jim Meyering
Eric Blake <[EMAIL PROTECTED]> wrote: > Contrast the following: > > $ mkdir a b c > $ echo 1 > a/f > $ echo 2 > b/f > $ cp -v a/f b/f c --remove-destination > `a/f' -> `c/f' > cp: will not overwrite just-created `c/f' with `b/f' > > with the similar: > > $ rm c/f > $ ln -vf a/f b/f c > `c/f' => `a

Re: ln overwrites newly created files

2007-08-21 Thread Eric Blake
-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 t

Re: ln overwrites newly created files

2007-08-21 Thread Philip Rowlands
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. Doesn't POSIX require this to succeed? Cheers, Phil ___