by Animats · 10y ago · 0 comments
May not be available for your operating system variant. May not be available for your file system. Not applicable to some remote file systems. May not function properly in some virtual machines. Consult your storage area network vendor for additional information.
The only reason I suspect things do unlink-then-rename is that (evidently) rename() doesn't promise anything about what happens to the "src" item if rename() fails, just that something will still be in "dest".[1]
But I don't know why the commands do something different, and don't want to try reading the source of either GNU or BSD mv to find out why.
[1] - http://pubs.opengroup.org/onlinepubs/009695399/functions/ren...
If it doesn't exist in practice or does something different in a thousand edge cases, it's rightfully dismissed as nonexistant.
All the other still apply, and the GP forgot to tell you to check your HD model's documentation.