How To Unzip A Gz File In Linux?

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/how-to-unzip-a-gz-file-in-linux/
PINTEREST
PINTEREST
INSTAGRAM

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.

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/how-to-unzip-a-gz-file-in-linux/
PINTEREST
PINTEREST
INSTAGRAM
LEARN MORE  Linux tar Command and How To Tar A Directory