Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 17
    To be entirely fair, the difference between moving and renaming a file is rather arbitrary. "Renaming" a file is just moving it to a different location which happens to be in the same directory. Commented May 30, 2012 at 9:22
  • mv create a new inode(?) and moves the reference to the file contents from the old inode to the new one. Except when it's not on the same device. Then it copies the contents and removes the inode. Commented Jun 7, 2012 at 15:19
  • 3
    What's also fun is that you can mv/rm a file which is open by another process. The other process still has a reference to the file contents. Different from other OS Commented Jun 7, 2012 at 15:19
  • @Paul - My Unix is pretty rusty, but I think you have it a little backward. The inode is the unique identifier of the file. So, in the same device case, a new directory entry is created pointing to the same inode and then the original directory entry is removed. I wonder why Apple hasn't sued someone over "inode". Commented Jun 7, 2012 at 19:51