GNU bug report logs -
#6960
mv refuses to move a symlink over a hard link to the same file
Previous Next
Full log
Message #23 received at 6960 <at> debbugs.gnu.org (full text, mbox):
Voelker, Bernhard wrote:
> 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"?
--backup=never means "never make numbered backups; always make single
backups", quoting emacs documentation (see 'Single or Numbered Backups' in
info emacs). That's where that ambiguous name originated.
Or perhaps more relevant, see "info coreutils mv":
`simple'
`never'
Always make simple backups. Please note `never' is not to be
confused with `none'.
When in doubt, refer to the "info" documentation,
not the man page.
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.