Home > Commands, Linux > Linux – GZip decompress files

Linux – GZip decompress files

GZIP can compress a file reducing it to 70 or 80 percent. Unlike tar it replaces the original file with a compressed version. The compressed file has the same ownership modes, access time, and modification time as the original.

Decompress Files

To decompress files use

gzip –d, gunzip,




gzip filename.txt

This will produce a compressed file called filename.txt.gz, and filename.txt will be deleted.
To decompress filename.txt.gz run the following:

gunzip filename.txt.gz

This will produce filename.txt and delete filename.txt.gz

Using the -n

Sets the speed at which files are compressed. The faster a file is compressed, the lower the amount of compression performed. With the -# option, # can be any number between 1 and 9 where 1 is the fastest and 9 is the slowest. The –fast option is the equivalent to -1 whereas –best is the equivalent to -9. By default gzip performs compression as thought the -6 option was specified.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: