lln - a routine to list all links to a file

Kim Chr. Madsen kimcm at olamb.UUCP
Fri Jan 2 23:13:52 AEST 1987


In article <659 at instable.UUCP>, amos at instable.UUCP (Amos Shapir) writes:
> What's wrong with:
> 
> set `ls -id file`
> find / -inum $1 -print
> 
Well nothing, if you don't have more than one filesystem or don't care
about references to files which have nothing in common with the file searched
for!

Don't forget that there is a separate inode table connected to each filesystem,
if / (root) and /usr is on separate filesystems they both have the inode 2,
but /usr is not a link to /.

What you'll have to do to make this work is to identify the filesystem where
the ``file'' is located and then make the find command start at that point.

					Best wishes for 1987
					Kim Chr. Madsen



More information about the Comp.sources.unix mailing list