Each entry in a Unix 6th directory was a fixed size: 16 bytes
- 14 bytes for the name (not null terminate)
- 2 bytes for the inode number
The link system call permits creating a file reference in one directory to an existing file in another directory. The names don't have to be the same, but they refer to the same file contents.
An example above is the file with inode number 160: hello.c
The referenced inode contains all the file information (permissions, file size, last time of modification, location of blocks on disk, etc.)
The inode also contains a link count.
Either file hello.c could now be 'deleted', but that would
- remove its entry from the directory where it was deleted
- decrement the link count to 1