mattvaldes at satx.rr.com
Tue Nov 13 09:12:22 CST 2007
Use zcat to view the contents of gzipped files without having to uncompress
zcat /var/log/messages*.gz | grep -i pattern
On Tuesday 13 November 2007 08:34:59 Geoff wrote:
> There are so many programs out there written for linux, for generic
> linux jobs, it's easy to get bogged down in the myriad of possibilities.
> I'm looking for one utility, in particular (that probably already
> exists) that will look at the contents of such files as say...
> I know they're archived, but I'm looking for a specific string, without
> having to expand the silly thing to a temp dir, which would consume
> space on a drive,
> use 'less 'filename' | grep -i pattern', get pissed because what I'm
> looking for isn't there, delete that expanded archive, then go through
> the whole procedure again, for files that start at the beginning of LAST
> There's GOT to be an easier way!
> Command line help, that is. no gui packages, please.
More information about the SATLUG