Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Probably the most common case where this comes up is in the context of hard links: two (or more) files with different names that point to the same inode. I guess actual usage of hard links is rare enough that it doesn't come up all that often, but I'm actually surprised you didn't know this – not judging you, just something I thought most more experienced Linux/Unix users knew, but it seems not.

Hard links can be a somewhat notorious footgun due to this by the way; with a soft link you know you're only deleting a link, but with "rm hard-link" this is a bit trickier: if you think there's another link but actually, it turns out you made an error and there's not then you've lost that file. A "hard link" isn't really a thing on its own: it's just another reference to an inode. This is why symbolic links are used in most cases, but you can hard links are still used from time to time in e.g. /bin and some other places.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: