On Mon, Jan 18, 2010 at 03:28:21PM -0200, Adriano Rafael Gomes wrote:
> Em Mon, 18 Jan 2010 14:16:53 -0300
> DIEGO MONTE <[email protected]> escreveu:
> 
> > Preciso identificar (listar), no Linux, todos os arquivos, padrão
> > texto (*.txt), a partir de um determinado diretório, de forma
> > recursiva, ou seja, todos os seus subdiretórios, que contenham uma
> > determinada string em seu conteúdo. Temos alguma "saída" para tal
> > problema?
> 
> Diego, ajuste os valores para 'diretorio' e 'string' abaixo e tente:
> 
> $ find diretorio -name '*.txt' -exec grep 'string' {} \;

  De certo o grep debe levar '-l' pra listar os arquivos, nao o conteudo

  $ find diretorio -name '*.txt' -exec grep -l 'string' {} \;    

> 
> 

-- 
Porqué loitar e matar, se podes amar e sonhar

/"\
\ /  CAMPANHA DA FITA ASCII - CONTRA MAIL HTML
 X   ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
/ \


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

Responder a