Search code examples
linuxhardlink

hardlinks in Linux


What is the size of the hardlink in Linux? Will it be the size of the inode? If I have two of them?

Thanks in advnace for any explanation, I tried to google it, but didn't find anything


Solution

  • A hard link reuses the inode, but requires a separate directory entry, which takes up 8 bytes plus the length of the file name in ext2. There may be other costs associated, such as when directory indexing is used, also, directories grow by entire blocks.