Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site lsuc.UUCP
Path: utzoo!lsuc!dave
From: dave@lsuc.UUCP (David Sherman)
Newsgroups: net.unix-wizards
Subject: Re: How can I find where a link leads to ???
Message-ID: <295@lsuc.UUCP>
Date: Mon, 14-Jan-85 14:30:38 EST
Article-I.D.: lsuc.295
Posted: Mon Jan 14 14:30:38 1985
Date-Received: Mon, 14-Jan-85 15:44:37 EST
References: <720@hou2h.UUCP>
Reply-To: dave@lsuc.UUCP (David Sherman)
Organization: Law Society of Upper Canada, Toronto
Lines: 25
Summary: ls -i, ncheck -i, or find -inum

Well, strictly speaking, a link leads to its inode, which you can
find with "ls -i". But I suspect you want to know what other links
there are to the same inode.

If you have access to the raw disk (you usually have to be root),
type "ncheck -i 1234 /dev/abc", where 1234 is the inode you want
and /dev/abc is the disk device (the raw device, /dev/rabc, will
be faster, actually).

In other cases, you need to start at the root of the file system in
question and search for the inode you want. One way is:
	find /abc -inum 1234 -print
If you can, start this search further down the tree (e.g., if you're
pretty sure the link is somewhere in your own files, start it at
your home directory).

Another way, if you have the Berkeley ls(1), is
	ls -R1i /abc | grep 1234
but this will only give you the file names, not their directories.
(If you examine the entire ls output by hand, you'll see the directories.)

Dave Sherman
-- 
{utzoo pesnta nrcaero utcs}!lsuc!dave
{allegra decvax ihnp4 linus}!utcsrgv!lsuc!dave