In light of the answers to two previous questions, it seems that under RHEL/CentOS 7 mv
even on the same filesystem is actually doing a cp
then rm
.
In previous editions of CentOS/RHEL, a mv
on the same filesystem (even from a deep directory to a new deep directory) was very fast even on large files (say collections of installation media or large videos).
However, on my personal CentOS server, when watching what mv
is actually doing when moving large files, it's taking as long as a cp
followed by rm
.
Which makes me wonder why the behavior has apparently changed from just being a wrapper to rename()
(as per the POSIX standard).
Is this correct? And, if so, why did the mv
utility change behavior in CentOS 7?
mount
? I suspect there are two different filesystems involved. – Wildcard Aug 23 '16 at 19:54