[lug] Grep question

Joey McDonald jmcdice at gmail.com
Fri Jul 23 10:51:24 MDT 2004


On Fri, 23 Jul 2004 03:46:23 -0600 (MDT), Daniel Webb
<lists at danielwebb.us> wrote:
> On Thu, 22 Jul 2004, Joey McDonald wrote:
> 
> > I usually do something like:
> >
> > find /dir/to/search -type f | xargs -n1 grep -l string $1
> 
> I don't see how that finds the string inside a gzipped text file.

Heh, well what I was thinking was that you could do:

find /dir/to/search -name "*.gz" | xargs -n1 zgrep -l string $1

guess I should have said that. :)



More information about the LUG mailing list