Fast way to 'cat' them is:
Code: Select all
zcat /var/log/somelog.2.gz
Code: Select all
zgrep 'lookingfor' /var/log/somelog.2.gz
Code: Select all
zgrep 'lookingfor' /var/log/somelog.*.gz
If you need another processing command, for example 'exigrep', you can process .gz file through the 'zcat' pipe output:
Code: Select all
zcat /var/log/exim4/mainlog.2.gz | exigrep 'somedomain.com'
Code: Select all
zcat /var/log/exim4/mainlog.*.gz | exigrep 'somedomain.com'