It is confusing to say that the Unix command mv moves a file from one location on the hard disk to another. If the source and destination are the same filesystem, mv simply calls rename(). Files can be renamed across directories, because the filename is just a pointer, stored in the directory, to the file's inode. If the source and destination are different filesystems, mv copies the file and removes the original.