Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

If God had a beard, he'd be a UNIX programmer.


computers / comp.os.linux.misc / Re: how to dereference "which" command to show physical unlinked location?

SubjectAuthor
* how to dereference "which" command to show physical unlinkedArthur Dent
`* Re: how to dereference "which" command to show physical unlinkedLew Pitcher
 `- Re: how to dereference "which" command to show physical unlinkedJoe Beanfish

1
how to dereference "which" command to show physical unlinked location?

<t65f3d$elo$1@gioia.aioe.org>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7380&group=comp.os.linux.misc#7380

 copy link   Newsgroups: comp.os.linux.misc
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.mixmin.net!aioe.org!TVR4W8nzk3t3s/u5DvDjIg.user.46.165.242.75.POSTED!not-for-mail
From: den...@bbc.co.uk (Arthur Dent)
Newsgroups: comp.os.linux.misc
Subject: how to dereference "which" command to show physical unlinked
location?
Date: Thu, 19 May 2022 21:01:30 +0800
Organization: Aioe.org NNTP Server
Message-ID: <t65f3d$elo$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="15032"; posting-host="TVR4W8nzk3t3s/u5DvDjIg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
Firefox/68.0 SeaMonkey/2.53.12
X-Mozilla-News-Host: snews://nntp.aieo.org:563
X-Notice: Filtered by postfilter v. 0.9.2
 by: Arthur Dent - Thu, 19 May 2022 13:01 UTC

If you do "which javac", it responds with /usr/bin/javac
which is a pointer to the /etc/alternatives bollocks
which is another link to something like
/usr/lib/jvm/java_1702_distro_2022_wankwank

So I want to get the latter, as one cannot strip bin/javac off the first
answer to derive $JAVA_HOME
"which" command does not have a dereference option to yield the actual
landing point.

Re: how to dereference "which" command to show physical unlinked location?

<t65hgg$92c$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7381&group=comp.os.linux.misc#7381

 copy link   Newsgroups: comp.os.linux.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: lew.pitc...@digitalfreehold.ca (Lew Pitcher)
Newsgroups: comp.os.linux.misc
Subject: Re: how to dereference "which" command to show physical unlinked
location?
Date: Thu, 19 May 2022 13:42:40 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <t65hgg$92c$1@dont-email.me>
References: <t65f3d$elo$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 19 May 2022 13:42:40 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="b939726b21556c1adc48553f8cbe1e44";
logging-data="9292"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/AWKpl8s0CpSTGahvswLyZpRd8JiEzzeY="
User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508
git://git.gnome.org/pan2)
Cancel-Lock: sha1:CHa3VkH6x9404QN6ApOWw3ZXVJc=
 by: Lew Pitcher - Thu, 19 May 2022 13:42 UTC

On Thu, 19 May 2022 21:01:30 +0800, Arthur Dent wrote:

> If you do "which javac", it responds with /usr/bin/javac which is a
> pointer to the /etc/alternatives bollocks which is another link to
> something like /usr/lib/jvm/java_1702_distro_2022_wankwank
>
> So I want to get the latter, as one cannot strip bin/javac off the first
> answer to derive $JAVA_HOME "which" command does not have a dereference
> option to yield the actual landing point.

This may not work for you, but the realpath(1) utility spits out
"the resolved absolute file name", and can resolve symbolic links
to do so.

Try
realpath $(which javac)

HTH
--
Lew Pitcher
"In Skills, We Trust"

Re: how to dereference "which" command to show physical unlinked location?

<t65k0d$vop$3@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7382&group=comp.os.linux.misc#7382

 copy link   Newsgroups: comp.os.linux.misc
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!news.freedyn.de!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: joebeanf...@nospam.duh (Joe Beanfish)
Newsgroups: comp.os.linux.misc
Subject: Re: how to dereference "which" command to show physical unlinked
location?
Date: Thu, 19 May 2022 14:25:18 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <t65k0d$vop$3@dont-email.me>
References: <t65f3d$elo$1@gioia.aioe.org> <t65hgg$92c$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 19 May 2022 14:25:18 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="d3e15060b09383e11598f9bf1cab0f57";
logging-data="32537"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19NWsyMW8TRDOfxQn0+z7FYY8809nUukeQ="
User-Agent: Pan/0.146 (Hic habitat felicitas; 8107378
git@gitlab.gnome.org:GNOME/pan.git)
Cancel-Lock: sha1:2lvvBEG0jth7gZnc2tc973ebleg=
 by: Joe Beanfish - Thu, 19 May 2022 14:25 UTC

On Thu, 19 May 2022 13:42:40 +0000, Lew Pitcher wrote:

> On Thu, 19 May 2022 21:01:30 +0800, Arthur Dent wrote:
>
>> If you do "which javac", it responds with /usr/bin/javac which is a
>> pointer to the /etc/alternatives bollocks which is another link to
>> something like /usr/lib/jvm/java_1702_distro_2022_wankwank
>>
>> So I want to get the latter, as one cannot strip bin/javac off the first
>> answer to derive $JAVA_HOME "which" command does not have a dereference
>> option to yield the actual landing point.
>
> This may not work for you, but the realpath(1) utility spits out
> "the resolved absolute file name", and can resolve symbolic links
> to do so.
>
> Try
> realpath $(which javac)
>
>
> HTH

readlink -f
does the same thing, in case you have one but not the other.

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor