LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 01-10-2004, 05:14 PM   #1
Godboo
LQ Newbie
 
Registered: Jan 2004
Location: Arizona, USA
Distribution: Slackware 9.1
Posts: 22

Rep: Reputation: 15
Tar/Zip Files and Such


Hey Guys,

Just wondering what is the difference between tar, and zip/gunzip/bzip?

Also, if a file haz an extension ***.tar.gz, how would you uncompress it at the shell?


Thx for any feedback.
 
Old 01-10-2004, 05:16 PM   #2
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
The search button is your friend.

Tar is originally based on 'tape archiving' - still does that, but it's mainly used to bundle up many files into one. zip, gzip, and bzip are all compression utilities, using different algorithms. So a *.tar.gz is a file that has been gzipped and tarred. To extract it,

tar -xzf file

If it's been bzipped, it's

tar -xjf file

If it's been zipped, I usually do 'unzip file'.

Man tar (and all the rest for more details.)

-- Actually, to be a little more precise, bzip is a better algorithm - compresses more - but takes longer to compress and extract. gzip is pretty good and faster. But, on most processors, .005 seconds and .007 seconds isn't much to get excited about. Then again, with today's hard drives and DSL, 250k and 230k (I'm making up numbers - I'm not sure what the actual average ratio is) isn't much either.

Last edited by slakmagik; 01-10-2004 at 05:19 PM.
 
Old 01-10-2004, 05:33 PM   #3
itsme86
Senior Member
 
Registered: Jan 2004
Location: Oregon, USA
Distribution: Slackware
Posts: 1,246

Rep: Reputation: 59
tar is for creating "tape archives". At least that's what it was for originally. The reason tar is still used in conjunction with gzip and bzip is because they only have the ability to compress one file.

gzip's compression is better than zip's (and not much speed difference). bzip2's compression is better than gzip's, but takes a bit longer to compress. Decompression between bzip2 and gzip is hardly noticeable though.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
a tough question 4 u, problem in extracting tar & tar.gz files p_garg Linux - General 5 11-08-2010 12:02 PM
How to Install tar, zip, rpm file? AskMe Linux - Newbie 5 09-25-2003 04:13 PM
how to open gz.zip.tgz.zipfiles and tar tarak4u Linux - General 2 05-08-2002 03:52 AM
Nautilus File Associations (zip/tar/gz) twelve71 Linux - Newbie 5 04-22-2002 08:57 AM
Nautilus zip/tar/gz File Associations twelve71 Linux - General 0 04-17-2002 10:56 AM


All times are GMT -5. The time now is 06:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration