Wazaterm » Linux Commands » zgrep

How to use zgrep Linux command

The zgrep command invokes grep on compressed or gzipped files. All options specified are passed directly to grep. If no file is specified, then the standard input is decompressed if necessary and fed to grep. Otherwise, the given files are uncompressed if necessary and fed to grep.

Usage

Find out user's login history

$ zgrep username /var/log/auth.log*