SLUG Mailing List Archives
Re: [SLUG] recursive tree log grep ?
- To: Voytek Eymont <voytek@xxxxxxxxxx>
- Subject: Re: [SLUG] recursive tree log grep ?
- From: Christopher JS Vance <slug@xxxxxx>
- Date: Sat, 21 May 2005 23:15:28 +1000
- Cc: slug@xxxxxxxxxxx
On Sat, May 21, 2005 at 11:12:22PM +1000, Voytek Eymont wrote:
I have tree like:
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
find /home/*.*/logs -type f | xargs grep a-string