osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Does mv on a FAT filesystem actually rename or does it copy and delete?


On Sat, 03 Feb 2018 11:30:28 -0500, Paul Smith wrote:
>That doesn't answer the question.

The question already was mostly answered, by underpinning it with an
strace output, just not on a VFAT, because not that many subscribers
might use this file system.

>it's going to rely on the published kernel interface to move a file,
>e.g. invoke the rename(2) system call.
>
>However, that doesn't mean that the actual behavior of that system call
>is the same on a VFAT filesystem

Indeed, strace might fool us. Fair enough, that's one reason why I
mentioned Google.

I wonder why it could be much important that the rename operation on
VFAT is or isn't atomic, when renaming files or dirs on the same
partition. First coping and then removing does have at least two
pitfall, since an accident could lead to duplicated files and
temporarily requires double the free diskspace, but this actually isn't
catastrophic.