$ find -type f -links +1
this because hard links have, by definition, more than one link pointing to them, as you can see with ls or stat on one of them.
Another useful tip: to know about any hard link which is related to a specified file use something like:
$ find /home -xdev -samefile foothis will print out all files which are hardlinked to foo. Remember that hard links have the same inode number which can be seen with
$ ls -li fooonce you know the inode number, you can also search for hard links with something like
$ find /home -xdev -inum 7465209Have fun!
No comments:
Post a Comment