Gzip: Difference between revisions

From Hackepedia
Jump to navigationJump to search
m New page: gzip is a compression program. Its compressed programs have a .gz extension often in association with .tar.gz which is a compressed tarball. To decompress one uses gunzip at which the .t...
 
m limitation
Line 2: Line 2:


tar -xvzf file.tar.gz would decompress based on the -z flag.
tar -xvzf file.tar.gz would decompress based on the -z flag.
$ ls -l termcap
-r--r--r--  1 pjp  wheel  732942 May 30 20:13 termcap
$ gzip termcap
$ ls -l termcap.gz
-r--r--r--  1 pjp  wheel  235552 May 30 20:13 termcap.gz
$ gzip termcap.gz
gzip: termcap.gz already has .gz suffix -- unchanged
Notice the compression on a textfile was about 3:1, but you cannot compress a compressed file again.

Revision as of 08:17, 30 May 2008

gzip is a compression program. Its compressed programs have a .gz extension often in association with .tar.gz which is a compressed tarball. To decompress one uses gunzip at which the .tar is left to itself. Often one can also call gunzip from tar itself

tar -xvzf file.tar.gz would decompress based on the -z flag.

$ ls -l termcap
-r--r--r--  1 pjp  wheel  732942 May 30 20:13 termcap
$ gzip termcap
$ ls -l termcap.gz
-r--r--r--  1 pjp  wheel  235552 May 30 20:13 termcap.gz
$ gzip termcap.gz
gzip: termcap.gz already has .gz suffix -- unchanged

Notice the compression on a textfile was about 3:1, but you cannot compress a compressed file again.