Unzipping a gzip File with gunzip

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:

1.
ls -l *.gz At the shell prompt, verify the name of the gzipped file with ls *.gz (Code Listing 13.11).
2.
gunzip zipadeedoodah.gz Enter gunzip and the name of the file to unzip. gunzip will uncompress the file(s) and return you to the shell prompt.

✓ Tips

  • 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 ...

Get Unix Third Edition: Visual Quickstart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.