How can I find all hardlinked files on a filesystem?

Posted by haimg on Super User See other posts from Super User or by haimg
Published on 2012-10-10T15:35:24Z Indexed on 2012/10/10 15:40 UTC
Read the original article Hit count: 388

Filed under:
|

I need to find all hardlinked files on a given filesystem. E.g. get a list of files, each line contains linked pairs, or triplets, etc.

I understand more or less how to do it, one needs to create a dictionary keyed by inode for all files/directories on a filesystem, exclude "." and ".." links, and then indodes with more than one name are hardlinks... But I hope that maybe a ready-made solution exists, or someone already wrote such a script.

© Super User or respective owner

Related posts about linux

Related posts about hardlink