bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#6960: mv refuses to move a symlink over a hard link to the same file


From: Voelker, Bernhard
Subject: 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]