How To Unzip A Gz File In Linux? – POFTUT

How To Unzip A Gz File In Linux?

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.

Detect Files Type

Detect Files Type

List Files

Before decompressing files the files inside gzip can be listed.

List Files

List Files

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. We will unzip the file named my.c.gz file which contains my.c and newtextfile.

Unzip or Decompress Fully

Unzip or Decompress Fully

-d option is used to decompress given gz or compressed file.

Leave a Reply

Your email address will not be published. Required fields are marked *

Enjoy this blog? Please spread the word :)