Re: OT: passing values to ls -- more questions!

2004-01-04 Thread Matt Price
On Sun, Jan 04, 2004 at 04:56:18PM +, Colin Watson wrote:
> On Sun, Jan 04, 2004 at 11:41:48AM -0500, Matt Price wrote:
> > I can collapse these  two steps now with: 
> > 
> > [EMAIL PROTECTED]:~$ ll $(which emacs)
> > 
> > ... but is there a way to trace the whole chain of symbolic links all the way
> > to 
> > -rwxr-xr-x1 root root  4254776 2002-04-09 18:46
> > /usr/bin/xemacs-21.4.6-gnome-nomule
> > 
> > following the links manually takes about 5 steps!  Is there a command
> > that will trace links recursively until it ends up at a real file?
> 
>   readlink -f
> 
wicked, thanks! 
matt


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: OT: passing values to ls -- more questions!

2004-01-04 Thread Colin Watson
On Sun, Jan 04, 2004 at 11:41:48AM -0500, Matt Price wrote:
> I can collapse these  two steps now with: 
> 
> [EMAIL PROTECTED]:~$ ll $(which emacs)
> 
> ... but is there a way to trace the whole chain of symbolic links all the way
> to 
> -rwxr-xr-x1 root root  4254776 2002-04-09 18:46
> /usr/bin/xemacs-21.4.6-gnome-nomule
> 
> following the links manually takes about 5 steps!  Is there a command
> that will trace links recursively until it ends up at a real file?

  readlink -f

Cheers,

-- 
Colin Watson  [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: OT: passing values to ls -- more questions!

2004-01-04 Thread Matt Price
On Sun, Jan 04, 2004 at 07:46:28AM -0500, Paul Morgan wrote:
> ls -ld $(locate charter | grep -i font)

this is great, thanks!  I do like this syntax a bit better, I think.  

While we're on the subject of ls, here's another problem...  

I often want to find out which version of a program I'm using, e.g.,

which xemacs

which returns

/usr/bin/xemacs

of course, ls -l reveals:  

lrwxrwxrwx1 root root   23 2003-09-06 02:18
/usr/bin/xemacs -> /etc/alternatives/xemacs

I can collapse these  two steps now with: 

[EMAIL PROTECTED]:~$ ll $(which emacs)

... but is there a way to trace the whole chain of symbolic links all the way
to 
-rwxr-xr-x1 root root  4254776 2002-04-09 18:46
/usr/bin/xemacs-21.4.6-gnome-nomule

following the links manually takes about 5 steps!  Is there a command
that will trace links recursively until it ends up at a real file?
I've tried various switches on ls (ls -H, ls -L) but they don't seem
to do what I want them to...

anyway, thanks a bunch!
matt


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]