I bet this is done with inodes. Deleted files aren’t truely deleted until nothing has it open and its inode gets dropped. Like ARC for files.
You can also do interesting things like overwrite a “file” (as in a specific filesystem path) with new contents while keeping anything that already has the file open on the old contents by unlinking the old inode to the path and writing the new contents under a new inode. I believe mv does this. The kind of lesser known feature that probably strikes a good balance between preventing super annoying silent errors/corruption and causing them.
I bet this is done with inodes. Deleted files aren’t truely deleted until nothing has it open and its inode gets dropped. Like ARC for files.
You can also do interesting things like overwrite a “file” (as in a specific filesystem path) with new contents while keeping anything that already has the file open on the old contents by unlinking the old inode to the path and writing the new contents under a new inode. I believe mv does this. The kind of lesser known feature that probably strikes a good balance between preventing super annoying silent errors/corruption and causing them.
Relevant Kevin Fang video