I was trying to move a directory with the 'mv' command.
Instead of renaming the files it copied and deleted them. The source and destination were the same disk which a stat of the source and destination would confirm. The "oddity", is that I was moving between /usr/share/fonts -> /home/law/fonts where I use "rbind" to mount part of home in /usr/share: (fstab) /home/share /usr/share none rbind stat shows:
stat -c %D /usr/share /home/share
fe03 fe03 So... why didn't it rename if the device numbers are the same? I'm sure it wouldn't try a rename if I moved from /usr->/usr/share as share is a different partition/device number, so it seems 'mv' does check device id's to verify sameness upon move. Then why not in moving what was "effectively", /home/share/fonts/<dirname> => /home/law/fonts/. ? It was only 12G of files, so it was done in ~ 5-10 minutes, but I was expecting a few seconds...?? Coreutils 8.21/linux 3.9.11 / xfs filesystem.
