LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   tar.gz? (https://www.linuxquestions.org/questions/linux-newbie-8/tar-gz-3017/)

Manyguns 06-01-2001 08:58 PM

What exactly does this file extension stand for, and how do I install files that contain it. Please give me some advice.

rshaw 06-01-2001 09:35 PM

the tar stands for Tape ARchive,and the .gz indicates that it was compressed with gzip. there is also a .bz2 extension indicating bzip2 compression (bzip2 makes slightly smaller compressed files)

to extract type: gunzip filename.tar.gz

then read the install or readme file for final install instructions

its usually ./configure
make
make install


jharris 06-02-2001 09:35 AM

It should be noted that rshaw's example extract command will only leave you with a filename.tar file, not the contents of the tar. If you just have a .tar file then use
Code:

tar xvf filename.tar
to extract the contents. Peronally I like to see what it's extracting hence the 'v' in the above (verbose) if you don't want the lisings remove the v.

You can also do it all in one go if you have the GNU version of tar (99% likely) by doing a
Code:

tar xvfz filename.tar.gz
which will first run the file through gzip for you (BTW gunzip is really 'gzip -d'). If you're using a bzip2 file there is a command to tell tar to first filter it through a program (in this case bzip2) but I can never remember it so I use
Code:

bzip2 -dc filename.tar.bz2 | tar xvf -
The way you think of it is that tar joins lots of files together, and gzip/bzip2 compresses them to make them smaller. Unlike the .zip format that you have no doubt used in the past .gz files can contain only a single file, hence the use of tar first.

HTH

Jamie...

justin19fl 06-04-2001 06:12 PM

related question
 
Why don't Linux users just use Zip files? They seem so much simpler.

jharris 06-04-2001 07:21 PM

Re: related question
 
Quote:

Originally posted by justin19fl
Why don't Linux users just use Zip files? They seem so much simpler.
I've never really heard a good answer for this one... Probably just becuase tar has been around since the dawn of time (as all UNIX users know, time began on 1/1/1970 ;)) so we've stuck with it. As for gzip Vs. Zip gzip does seems to give slightly better compression.

If anyone does know a 'real' reason I'd love to know! The only one I can think of is that .zip files won't hold details of file owners or permissions, but .tars will.

Jamie...

justin19fl 06-04-2001 07:48 PM

Cab files are smaller than both. How come nobody uses Cab files? The only place I ever see them is for Windows backups and Windows CD's.

justin19fl 06-04-2001 07:50 PM

Microsoft obviously likes them, so I guess that's a good reason to dislike them.

Sakura_Samurai 06-04-2001 10:47 PM

I belive, but I am not sure, that Microsoft developed the CAB system.


All times are GMT -5. The time now is 05:04 AM.