[lug] Grep question

Joey McDonald jmcdice at gmail.com
Thu Jul 22 23:00:57 MDT 2004


I usually do something like:

find /dir/to/search -type f | xargs -n1 grep -l string $1



On Thu, 22 Jul 2004 22:38:40 -0600 (MDT), Daniel Webb
<lists at danielwebb.us> wrote:
> I was wondering: what is the best way to search everything within a
> directory tree, including everything inside .tar, .gz, .bz2, .tar.bz2,
> .tar.gz files?  I have used grep -r, and Debian also has zgrep, which
> handles plain and .gz, but doesn't sport the recursive option.  What's the
> solution that does everything I want?
> 
> Daniel
> 
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug
>



More information about the LUG mailing list