Zgrep

The zgrep command is to grep as zcat is to cat: in other words, it does the job of grep on gzipped files. Here is a genuinely useful example:

[email protected]:/media/cdrom/ > zgrep kernel-source INDEX.gz ./DVD1/suse/i586/kernel-source-2.6.22.5-31.i586.rpm

So the text kernel-source has been found in the compressed file INDEX.gz, telling you where the kernel-source package can be found on the openSUSE media.

The full listing of every SUSE version is contained in a gzipped text file INDEX.gz on the distribution media. Here we have used zgrep to find a particular package.

Was this article helpful?

0 0

Post a comment