# Finding Keywords in file



## jaymax (Jul 14, 2011)

Directory with several thousands of links to *.gz compressed file
used 

```
zcat * | grep -in keyword
```
returns 

```
/usr/bin/zcat: Argument list too long
```
used some tricks to make arguments smaller, like

```
zcat 1* | grep -in keyword
```
works in some cases, but not all fileset, could probably write a script around it but would have to do so for several other commands. 
Is there any quick and dirty way to do so?


----------



## DutchDaemon (Jul 15, 2011)

Not sure if it helps, but zgrep(1) will at least save a couple of thousand system calls ..


----------



## wblock@ (Jul 15, 2011)

`% find . -exec zgrep -in keyword {} \+`


----------

