shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [shell-script] Recuperar o link de um arquivo


From: Aurelio Marinho Jargas
Subject: Re: [shell-script] Recuperar o link de um arquivo
Date: Thu, 13 Nov 2003 15:51:49 -0300 (ART)

ae meu,

 --- dr_maluko <address@hidden> escreveu: > 
> Quando realizo o comando "ls -la" ele me lista os seguintes dados:
> 
> "lrwxrwxrwx    1 root     root           32 Set 21  2002 startkylix
> ->
> /usr/local/kylix3/bin/startkylix"
> 
> Tem algum comando que pegue apenas o endereço do link, que no caso
> seria "/usr/local/kylix3/bin/startkylix"?

tem! usa o find:

    find . -type l -printf "%l\n"

tem também o comando `namei`, mas ele é palha.

$ ls -l abuseme.html 
lrwxrwxrwx    1 aurelio  aurelio        26 Ago  1 23:04 abuseme.html ->
../../samples/abuseme.html

$ find . -type l -printf "%l\n" | grep abuseme.html
../../samples/abuseme.html

$ namei abuseme.html 
f: abuseme.html
 l abuseme.html -> ../../samples/abuseme.html
   d ..
   d ..
   d samples
   - abuseme.html



falou.

=====
-- 
Aurelio Marinho Jargas - De volta para Curitiba & Conectiva
Apostila de Shell a venda http://aurelio.net/shell/apostila
Ser tosco eh... http://aurelio.net/fotos

______________________________________________________________________

Yahoo! Mail: 6MB, anti-spam e antivírus gratuito! Crie sua conta agora:
http://mail.yahoo.com.br


reply via email to

[Prev in Thread] Current Thread [Next in Thread]