If mv is asked to move a symlink over a hard link to the same file, it fails with the message, "A and B are the same file". There is no reason why it should complain rather than perform the move. Example:
$ ~/coreutils/coreutils.usr/bin/mv --version mv (GNU coreutils) 8.5.143-77702 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Mike Parker, David MacKenzie, and Jim Meyering. $ touch New_York $ ln New_York localtime $ ln -s New_York localtime.new $ ls -l total 0 -rw------- 2 matt matt 0 2010-08-31 17:10 New_York -rw------- 2 matt matt 0 2010-08-31 17:10 localtime lrwxrwxrwx 1 matt matt 8 2010-08-31 17:11 localtime.new -> New_York $ ~/coreutils/coreutils.usr/bin/mv localtime.new localtime /home/matt/coreutils/coreutils.usr/bin/mv: `localtime.new' and `localtime' are the same file -- Matt
