1 Answer
1

On a single filesystem, you can "move" a file by renaming it; the file itself stays in place, but a new name gets added and an old one removed (this is not guaranteed to be atomic, either - if both "a" and "b" exists, then calling mv a b may very briefly have both names refer to the same file "a", before that old name goes away).

To move a file from one place to another in the general case, you need to create a file with the new name, copy the data into it, and then delete the old one. On a local machine, but different filesystems, the "mv" command does that for you behind the scenes - you can see this happen this by running strace mv a /other/filesystem/b.

To do this between computers without a shared network filesystem, you have to do it step by step yourself, e.g. scp a otherhost:/path/to/new/a && rm a (the ampersands mean that the local file is only deleted if scp succeeded, which means it's extremely likely that the remote copy was made successfully).