Well, actually the inode of the file only stores how many hard links are
pointing at it. It does not know how many symbolic links are pointing at it
at all. A symbolic link is a directory link to a inode that stores the
symlink path in the inode instead of a list of file blocks. It's up to the
layers above the filesystem to resolve it.
If you're talking about hard links, well, you're right. A hard link is just
a directory entry that happens to point at the same inode as another one.
The inode does store the number of hard links, but not which directory entry
points to it. To find all of the directory entries, you're probably going to
have to search the entire filesystem. :(
>I apologize if this is the wrong group for this question. Just
>direct me to the right place, thanks. The questions concerns
>symbolic links. A file entry keeps track of how many symbolic links
>are attached to it. Am I correct in assuming that it has no
>information on where those links are located? I am trying to write
>a little utility that takes a file and tells me if and where all
>the links to it are located. Any help is greatly appreciated.