Interview Prep/Linux/Filesystem Hierarchy, Inodes & Links

What is the difference between `cp`, `mv` and `rename` at the inode level?

AdvancedConceptFilesystem Hierarchy, Inodes & Links
Answer

cp creates a new inode and copies the data. mv within the same filesystem is just a rename() syscall that changes the directory entry: same inode, instant, atomic. mv across filesystems is copy + delete, not atomic. That is why safe config deploys write to a temp file in the same directory and then mv it into place.

All Linux questions Roadmap: Linux

More on Filesystem Hierarchy, Inodes & Links