Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.