To access gzipped files, you'll need to unzip them. You do so using gunzip, as Code Listing 13.11 shows.
To Unzip a gzip File with gunzip:
ls -l *.gz
At the shell prompt, verify the name of the gzipped file with ls *.gz (Code Listing 13.11).
Enter gunzip and the name of the file to unzip. gunzip will uncompress the file(s) and return you to the shell prompt.
When you're unzipping files with gunzip, you're not required to enter the file extension. gunzip zipadeedoodah would work just as well as gunzip zipadeedoodah.gz.
You might encounter gzipped files with a .tgz (tarred, gzipped), tar.gz, or just .gz extension. It'll handle any of those gracefully.
Some systems don't recognize the gunzip command, so you might need to use gzip -d to uncompress the files.
If you have a compressed file that you know is textold funnysayings from the net.gz, for exampleyou can uncompress it (without deleting the original file) and view it with a single command: gzcatoldfunnysayingsfromthenet | more.
gunzip understands how to uncompress most (compressed) files, including those compressed with compress or .zip files from DOS/Windows systems.
Code Listing 13.11. Use gunzip to uncompress zipped files.