Is it possible for a directory to get unlinked while its contained files remain?
- by Walkerneo
I used to wonder why deleting directories via PHP or shell wasn't as easy as it was in Windows with just clicking delete. I realize now that deleting is simply unlinking files from the file allocation table, so to delete a directory, you must unlink all the files inside it.
Is it ever possible for the directory's entry to be removed, but not those of the files inside it? Do operating systems periodically check for files that can't be reached in the file system?