Am Freitag, 24. Februar 2006 14:17 schrieb Shriramana Sharma:
I know the difference between a hard link and a soft link. Basically a hard link is another file name to the same physical file on disk. A soft link is a special file containing the path to a regular file.
If I use ls -l, I am able to see the l at the beginning of the permissions for soft links. But for hard links I do not see any such special mark except that they share the same inode if I use ls -i.
How do I find out all the filenames which point to a single inode?
find is your friend :-) from the info page: <snip> -- Test: -samefile NAME File is a hard link to the same inode as NAME. If the `-L' option is in effect, symbolic links to the same file as NAME points to are also matched. -- Test: -inum n File has inode number N. The `+' and `-' qualifiers also work, though these are rarely useful. </snip> Oliver