First off, I would hope that most people know what a .ZIP file is from the days of dark --
Windows. UNIX has the same thing. Except there are two flavors - GnuZip and BZip.
Although many tend to only consider gzip, bzip is quite common as well. Tar is Tape
ARchive. And is there for making it easier for dropping just one file on a backup media. A
'tarball' is a tar.gz file. The easiest way to uncompress the files are as below.
gzip -options filename
-l list data
-N save filename and original timestamps
-v verbose output
-# replace # with a 1 - 9 (fastest to best compression)
1. gzip -dv beer.gz
gzip decompresses beer.gz and displays the files as they are decompressed. Beer.gz is
removed as whatever file inside is placed on the hard disk.
2. gzip -v beer
creates an archive of beer, called beer.gz
tar -options filename files
-f specifies file
-z use gzip
1. tar -xvf beer.tar
extracts content of beer.tar to the local directory. If there are directories specified, it
will create a subdirectory there.
2.tar -cvf beer.tar beer*
creates a tar called beer.tar of all files beginning with 'beer'.
3.tar -zxvf beer.tar.gz
extracts all files in beer.tar.gz and places them in your working directory.
4.tar -czvf beer.tar.gz beer*
compresses and tars the result, of all the files beginning with 'beer' in you working
5.tar -jvfx beer.tar.bz2
extracts all files from archive and places them in the current working directory
[Edit -- I am not god with bzip2, so email me with any additions. Thanks]
bzip2 -OPTIONS filename
1. bzip -v beer
bzips the file beer into the file beer.bz
2. bzip -df beer.bz
uncompresses content of beer.bz into current working directory