GNU bug report logs - #6960
mv refuses to move a symlink over a hard link to the same file

Previous Next

Package: coreutils;

Reported by: Matt McCutchen <matt <at> mattmccutchen.net>

Date: Tue, 31 Aug 2010 21:27:01 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 6960 <at> debbugs.gnu.org (full text, mbox):

From: "Voelker, Bernhard" <bernhard.voelker <at> siemens-enterprise.com>
To: Jim Meyering <jim <at> meyering.net>, Matt McCutchen <matt <at> mattmccutchen.net>
Cc: "6960 <at> debbugs.gnu.org" <6960 <at> debbugs.gnu.org>
Subject: RE: bug#6960: mv refuses to move a symlink over a hard link to the
	same	file
Date: Thu, 2 Sep 2010 12:10:01 +0200
Jim Meyering wrote:

> It is a deliberate feature.
>
> Personally, I prefer the semantics of 'mv -f --backup=numbered'
> so use a shell alias.

just for fun I tried to get no backup created and tried '--backup=never',
but a backup is still created (version 8.5 on Cygwin, and 5.93 on SLES-10.3):

$ uname -a > a
$ ln -s a b
$ mv -v --backup=never b a
`b' -> `a' (backup: `a~')
$ ls -l a a~
lrwxrwxrwx  1 vb027591 ugrp  1 2010-09-02 11:50 a -> a
-rw-r--r--+ 1 vb027591 ugrp 69 2010-09-02 11:50 a~

I expected mv either to fail as if --backup=... is not given,
or that it moves the file without creating a backup.

Maybe I'm a bit confused that the combination of the words "backup"
and "never" contrasts to what it does: it _creates_ a backup
- though mentioned in manual:

$ man mv
...
       simple, never
              always make simple backups

Am I just misunderstanding the backup CONTROL "never"?

Have a nice day,
Berny



This bug report was last modified 13 years and 179 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.