How can I find where a link leads to (find -inum feature)

Guy Harris guy at rlgvax.UUCP
Tue Jan 15 14:42:37 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.

(BTW, "find -inum" is in all the version of "find" I've seen, although
Berkeley are the only people who bothered documenting it.)  In addition to
being slow, this 1) may have several false hits, as it looks for all files
with that inumber regardless of what file system they're on and 2) also may
not work if some of the directory entries pointing to that inode are in
directories that you have no read access to.  You could run it as superuser,
but then if you can run as superuser you should use "ncheck" which is lots
faster and searches only one filesystem (thus eliminating problems 1) and 2)).

	Guy Harris
	{seismo,ihnp4,allegra}!rlgvax!guy



More information about the Comp.unix mailing list