Quick Answer: How Do I Find All Hard Links in Linux?
Contents

To find all hard links at once, have find spit out inodes for all files on a device, and then use things like sort and uniq to find duplicates. This will list files in the current directory and perform a ls on it.

You can search for hard links to inode number NUM by using ‘ -inum NUM ‘. If there are any file system mount points below the directory where you are starting the search, use the ‘ -xdev ‘ option unless you are also using the ‘ -L ‘ option.

Sarah Jenkins

Sarah Jenkins

Senior Technology Editor & AI Specialist

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.

Share this article
Twitter Facebook Pinterest