grahamperrin wrote:Very interesting.
In my test, the move succeeded. Can you explain what is wrong?
why you think, that it succeeded ? if you want to test real move as here described, it's "rename". try it. will fail.
what mv is doing is that it tries rename first. ten it falls back to cp & rm.
check man mv.
- Code: Select all
In its first form, the mv utility renames the file named by the source operand to the destination path named by the target operand.
and
- Code: Select all
As the rename(2) call does not work across file systems, mv uses cp(1) and rm(1) to accomplish the move.
and because you tested with zero sized file, you could not see the time needed to do it. try on a 1gb file.
matus