Hacker News new | ask | show | jobs
by yardie 5557 days ago
The developer had hard links or symbolic links? It must have been a hard link to do that type of damage. I find that really dangerous and that's why I never use them. Unless you are using an obscure version of UNIX, rm -rf should delete the delete and not the content of the folder it is linked to.
1 comments

A hardlink would be safer in this case. If there are two hardlinks to the same file and you rm one of the hardlinks, the other hardlink still works and the file itself isn't deleted.

A symlinked directory, though, being made victim of a recursive rm command, just might result in rm traversing through the directory and deleting everything inside of it.