On Sun, Aug 17, 2025 at 9:42 AM dan <d...@nnnne-o-o-o.com> wrote:

> I suggested I'm just watching at the behavior of the mv on Open Indiana
> and it seems to get that it always behave like a sequential cp + rm despite
> the presence of two different fs. And that it sounds safer after all..
>

When the source and destination are on different file systems, cp + rm is
required, because the bits
must be physically copied to the new file system.

When the source and destination are on the same file system, the file does
not actually get moved.
Instead, the directory entry (which points to the inode for the file) is
moved. The inode itself (which
holds all the information about the file other than its name(s)) does not
get moved or copied. It's
like ln + rm, instead of cp + rm. Just moving the directory entry is much
safer (and faster) than
actually moving the data to new disk sectors.

-ken

Reply via email to