[SATLUG] Utilities
Matt Valdes
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
them.
zcat /var/log/messages*.gz | grep -i pattern
or however.
-Matt
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...
> /var/log/messages-20061001.gz
>
> 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
> year.
>
> There's GOT to be an easier way!
>
> Help?
>
> Command line help, that is. no gui packages, please.
More information about the SATLUG
mailing list