[sf-lug] Simple way to track links-to-links to their final resolution?

RBV GoodWriter2548 at earthlink.net
Sun Dec 16 15:50:55 PST 2007

Note -- my question is NOT about Java or the JRE.

My question IS about a recent adventure wherein I was obliged to locate then
type the destination of multiple symbolic links to finally get to my
computer's Java Runtime Environment (JRE).

Simply put, something (I don't pretend to know what, exactly) configured one
link pointed to another link which pointed to another link which pointed to

So I used which, cd, and ls to follow a trail through three links before I
finally found a counter-intuitively named executable, as follows:

/usr/bin/java >
/etc/alternatives/java >
/usr/lib/jvm/java-gcj/jre/bin/java >
../../../../../bin/gij-4.1 (i.e., /usr/bin/gij-4.1)

It was finally gij-4.1 which appears to be my computer's JRE(?)

OKAY, MY QUESTION IS -- is there a command that lists the path taken through
multiple links to the ultimate destination?  Surely one doesn't need to do
this sort of detective work everytime a link references another?

Cheers, thanks, & see ya' all tomorrow (Monday) at the J'Cat,

More information about the sf-lug mailing list