Mailing List ArchiveSupport open source code!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: symlink destination
- To: tlug@example.com
- Subject: Re: symlink destination
- From: Viktor Pavlenko <vp@example.com>
- Date: Wed, 25 Oct 2000 15:50:48 +0900
- Content-Transfer-Encoding: 7bit
- Content-Type: text/plain; charset=us-ascii
- In-Reply-To: <39F67BFB.7C76E916@example.com>
- References: <14838.29947.837620.510820@example.com><39F67BFB.7C76E916@example.com>
- Reply-To: tlug@example.com
- Resent-From: tlug@example.com
- Resent-Message-ID: <mIVDS.A.op.IYo95@example.com>
- Resent-Sender: tlug-request@example.com
>>>>> "AS" == Antony Stace <antony@example.com> writes: AS> a bit of an overkill, but you could use find <the file you AS> want> -printf "%l" Wonderful. One more reason why linux is better than HPUX. I should have mentioned that I'm currently on the latter (it's TL(ove)U(nix)G group, right?). >>>>> "TOD" == Thomas O'Dowd <tom@example.com> writes: TOD> No way that I know to do with without a bit of shell TOD> programming. Here is an example of following more than one TOD> link to find the real name of a script. If you are dealing TOD> with a random file argument, then you also need to watchout TOD> for circular links... TOD> Tom. TOD> CMD=$0 while [[ -L "$CMD" ]] ; do ls=`/bin/ls -ld "$CMD"` TOD> link=`/usr/bin/expr "$ls" : '.*-> \(.*\)$'` if /usr/bin/expr TOD> "$link" : '/' > /dev/null; then CMD="$link" else TOD> CMD="`/usr/bin/dirname $CMD`/$link" fi done This is probably what I want to do (sorry, my formatting made it unrunnable). Thanks, Tony, thanks, Tom. Viktor
- References:
- symlink destination
- From: Viktor Pavlenko <vp@example.com>
- Re: symlink destination
- From: Antony Stace <antony@example.com>
Home | Main Index | Thread Index
- Prev by Date: Re: symlink destination
- Next by Date: Re: symlink destination
- Prev by thread: Re: symlink destination
- Next by thread: Re: symlink destination
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links