Link to home
Start Free TrialLog in
Avatar of beer9
beer9Flag for India

asked on

How to find the hard linked file?

How can I see whether a given file is hardlinked or not? like given a file how can I find how many files are sharing the same inode number? Thanks!
Avatar of sam_gibson
sam_gibson

ASKER CERTIFIED SOLUTION
Avatar of sam_gibson
sam_gibson

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Tintin
Tintin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Whoops, inode was a type, I meant inum.  To prevent find searching outside the filesystem, add the -xdev flag, eg:

find . -xdev -type f -inum <inode_number> -ls
Avatar of beer9

ASKER

Thank you :-)