- To: slug@xxxxxxxxxxx
- Subject: Re: [SLUG] recursive tree log grep ?
- From: "Voytek" <lists@xxxxxxxxxx>
- Date: Sat, 21 May 2005 23:31:09 +1000 (EST)
- User-agent: SquirrelMail/1.5.0
<quote who="Christopher JS Vance">
> On Sat, May 21, 2005 at 11:12:22PM +1000, Voytek Eymont wrote:
>>how do i run a grep across all logs, as in 'grep a-string /home/*/logs/*'
>
> If the logs are all immediately in the relevant logs directory, what
> you've typed in your question is a good start. If the logs appear at
> different directory depths, then maybe you need find and xargs. Say
> something like
>
> find /home/*.*/logs -type f | xargs grep a-string
thanks, Christopher
yes, they are all same depth, but., my string failed with:
# grep "elite" /home/*/logs/*
bash: /bin/grep: Argument list too long
yours seems to work, though, thanks
--
Voytek