2008/3/6, Ricardo Nabinger Sanchez <[EMAIL PROTECTED]>:
>
>
> On Thu, 6 Mar 2008 12:26:28 +0000
>
> "Lucas Salies Brum" <[EMAIL PROTECTED]> wrote:
>
>
> > Não funcionou!
>
> Isso não ajuda muito. Aqui testei e funcionou.
>
>
> --
>
> Ricardo Nabinger Sanchez [EMAIL PROTECTED]
>
> Powered by FreeBSD http://rnsanchez.wait4.org
>
> "Left to themselves, things tend to go from bad to worse."
>
> >
>
######################################################################################################
Desculapa! Esqueci q eram duas perguntas q vc fez!
No find eu nao sei como excluir um diretorio apenas da busca, mas vc pode
fazer o seguinte:
find ${DIRETORIOBUSCA} -iname ${OQVCBUSCA} | egrep -v
'^'${DIRETORIOEXCLUIDO}'($|/)'
sendo:
${DIRETORIOBUSCA} o diretorio q vc vai fazer a busca.
${OQVCBUSCA} a palavra q vc busca
${DIRETORIOEXCLUIDO} o diretorio q vc quer excluir
Eu usava assim, mas depois de ver oq o amigo ai acima disse, passei a usar a
opcao q tem no man:
find ${DIRETORIOBUSCA} -wholename '${DIRETORIOEXCLUIDO}' -prune -o -iname
${OQVCBUSCA} -print
se vc tirar o -print esse comando tb pode imprimir ${DIRETORIOEXCLUIDO} se
ele bater("casar") com ${OQVCBUSCA}.
olha oq deu no meu man find sobre o -path:
-path pattern
See -wholename. The predicate -path is also supported by
HP-UX find
--
Adote um pinguim, saiba como! Me mande um e-mail demonstrando interesse!
http://www.slackware.com
http://img365.imageshack.us/img365/8483/snapshot3ak6.png
U.L. : 450347
Fnord
--~--~---------~--~----~------------~-------~--~----~
GUS-BR - Grupo de Usuários de Slackware Brasil
http://www.slackwarebrasil.org/
http://groups.google.com/group/slack-users-br
-~----------~----~----~----~------~----~------~--~---