find string inside a gzipped file in a folder

zgrep will look in gzipped files, has a -R recursive option, and a -H show me the filename option:

zgrep -R --include=*.gz -H "pattern match" .

OS specific commands as not all arguments work across the board:

Mac 10.5+: zgrep -R --include=\*.gz -H "pattern match" .

Ubuntu 16+: zgrep -i -H "pattern match" *.gz

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)