How to Extract .gz File in Linux Command Easly and Quickly

How to Extract .gz File in Linux Command Easly and Quickly
How to Extract .gz File in Linux Command Easly and Quickly 

How to Extract .gz File in Linux Command Easly and Quickly - Gzip reduces the size of the named files using Lempel-Ziv coding (LZ77).  Whenever possible, each file is replaced by one with the extension .gz, while keeping the same ownership modes, access, and modification times.

(The default extension is -gz for VMS, z for MSDOS, OS/2  FAT,  Windows  NT  FAT, and Atari.) If no files are specified, or if a file name is "-", the standard input is compressed to the standard output. Gzip will only attempt to compress regular files.  In particular, it will ignore symbolic links.


# gunzip archive.gz

Compressed files can be restored to their original form using gzip -d gunzip or zcat.  If the original name saved in the compressed file is not suitable for its file system, a new name is constructed from the original one to make it legal.


By default, gzip keeps the original file name and timestamp in the compressed file. These are used when decompressing the file with the -N option. This is useful when the compressed file name is truncated or when the time stamp is not preserved after a file transfer.


I want to create one file and will gzip that

# gzip kitsake.blogspot.log
create .gz
create .gz


Now I will Extract .gz with the command

# gunzip kitsake.blogspot.log.gz
extract .gz
extract .gz

Closing statement

In conclusion, mastering the extraction of .gz files in Linux through commands like 'gunzip' and 'gzip' empowers users to efficiently manage compressed data, streamlining their command-line workflow. By understanding the intricacies of gzip compression and its associated commands, users can confidently navigate file compression and decompression tasks with ease. 

Whether it's archiving log files or handling compressed data transfers, the knowledge gained from this article equips users with essential skills for optimizing their Linux command-line experience.

Maybe that's all I can share with you guys, hopefully this article will be useful.

Thank You

Bangkit Ade Saputra
Bangkit Ade Saputra At the end of the day, my job involves people. we're complicated, we're always changing, we have millions of things going on in our lives, and changing jobs is always a big decision.

Post a Comment for "How to Extract .gz File in Linux Command Easly and Quickly "