How can I find where a link leads to

Mike Parker mike at amdcad.UUCP
Thu Jan 17 12:19:10 AEST 1985


> Granted you have found the inode number via:
> 	ls -i
> one can then use find with the -inum option to
> locate all the directory entries.
> Note that a find from / can take a veryyyyyyyy longgggggg time.
> 

Granted find is the only way to find all of the links, but
there is a special case for which there is an easier way.
If all of the links are suspected to be in one directory
( like all of the links to /bin/ex ) then I find out the inode 
number with ls -i and do an ls -i on the directory in question
with the output piped to "grep '^#'" where # is the inode number.
You can tell if you got all of the links by the link count.

Mike @ AMDCAD



More information about the Comp.unix mailing list