What is, on Linux, the way to get a list of a file's hardlinks ?
Tell me more
×
Server Fault is a question and answer site for
professional system and network administrators. It's 100% free, no registration required.
|
|||
|
|
|
Start by ensuring that the hardlink count from If so, then you can search for them, somewhat painstakingly:
This finds all files in a given path and compares the inode number of your source file against that of the found file(s). Hardlinks share the same inode. So if they match you have yourself a hardlink. |
||||
|
|
|
There may be an easier/quicker method but
which gives something similar to
then using the inode number from the Inode line,
|
|||||
|
|
For hardlinks only:
to also include symlinks:
Using |
|||
|
|