link count
The number stored in an inode that says how many directory entries point to it.
In more detail
Each hard link adds one and each removal subtracts one. The filesystem frees the inode and its data blocks only when the link count reaches zero and no process still has the file open. ls -l shows it in the second column.
Related terms
- inode — The record a filesystem keeps for each file, holding its owner, mode, size, timestamps, link count and the location of its data blocks, but not its name.
- hard link — An additional directory entry that points to an existing inode, so one file has two or more equal names.
- rm — The command that deletes files, and with -r whole directory trees, permanently.
- deleted but open file — A file whose last name has been removed but whose data still uses disk space because a process keeps it open.
Taught in
- Inodes, Hard Links And What rm Removes — Linux Fundamentals & Systems Administration