How To Unzip A Gz File
Gzip is a tool uses Lempel-Ziv (LZ77) to compress files. It is very popular in Linux community for its performance and compression level. To compress Log, Archive, Backup files gzip is extremely used.
Detect Files Type
First step to unzip or decompress gzip file is to be sure its file format is gzip. Here we can use file command to decide file type.
$ file my.c.gz
Before decompressing files the files inside gzip can be listed.
$ gzip -l my.c.gz
Here we can see information about compressed size,uncompressed size, ratio and file name.
Unzip or Decompress Fully
We will decompress the gzip file providing -d parameter.
$ gzip -d my.c.gz
-d means decompress