Is there a limit of number of hardlinks for one file? Is it specified anywhere? What are safe limits for Linux? And what for other POSIX systems?
|
Posix requires that the operating system understand the concept of hard links but not that hard links can actually be used in any particular circumstance. You can find out how many hard links are permitted at a particular location (this can vary by filesystem type) by calling The |
||||
|
|
|
Looking at the ext3 inode structure disk format in the linux kernel sources (*include/linux/ext3_fs.h*) that lists the links count as being a 16 bit number
I guess that means that an ext3 filesystem can have up to 65535 links. I haven't checked the values for other filesystems. |
|||
|
|
|
This is file system dependent. ext2/3/4 limit is 65k links ext4 source line 643, |
||||