• HiddenLayer555@lemmy.ml
    link
    fedilink
    English
    arrow-up
    16
    ·
    edit-2
    2 days ago

    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

    • AlteredEgo@lemmy.ml
      link
      fedilink
      arrow-up
      2
      ·
      1 day ago

      Thanks for explaining, I was wondering about that.

      Wait, is that why renaming or moving files on android takes forever?

      • diaphragmwp@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        8
        ·
        1 day ago

        No, that’s because Android. It’s also overlaying all filesystems to enforce stupid rules, like no files named “CON” and no files named the same in a different case (like in DOS).