• Supercrunchy@programming.dev
    link
    fedilink
    arrow-up
    4
    ·
    5 days ago

    The trick for windows is to rename the file and kill the process that’s using it / reboot (if it’s some unkillable service). The service won’t then be able to find the file after reatarting and you can delete the renamed copy.

    On linux this whole thing is done automatically by the OS: if a file is open and you delete it, it will disappear from the folder but its data won’t actually be deleted from the disk until it’s closed by every program. Some programs even use this trick to create invisible temporary files to offload some data from RAM to disk!