LinuxQuestions.org
Help answer threads with 0 replies.
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 11-05-2011, 08:52 PM   #1
dsplayer14
Member
 
Registered: Nov 2011
Distribution: Arch Linux and Slackware 13.37
Posts: 127

Rep: Reputation: 1
whats a tarball?


What is a tarball, how does it work, and how do you use it?
 
Old 11-05-2011, 09:00 PM   #2
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 190Reputation: 190
http://lmgtfy.com/?q=whats+a+tarball
 
Old 11-05-2011, 09:02 PM   #3
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
Hi dsplayer14, Welcome to LQ. A tarball is a compressed file similar to a zip file. You would decompress it or extract it if you need access to the files inside. You can read more at man tar.

Good luck. ;-)
 
1 members found this post helpful.
Old 11-05-2011, 09:22 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 11,791
Blog Entries: 13

Rep: Reputation: 2947Reputation: 2947Reputation: 2947Reputation: 2947Reputation: 2947Reputation: 2947Reputation: 2947Reputation: 2947Reputation: 2947Reputation: 2947Reputation: 2947
A further bit of trivia that I didn't learn till after using Linux for several years.

The format was developed in the days of tape backups. Tar stands for tape archive.
 
Old 11-05-2011, 09:58 PM   #5
alar
Member
 
Registered: Sep 2003
Location: Canada
Distribution: CentOS 5.5, Ubuntu 10.04, Linux Mint 11 gnome 64 bit
Posts: 336

Rep: Reputation: 36
There are usually two types of tarfiles available for extraction. There is the .tar.gz format and the .tar format

If you have a .tar.gz file, type:
tar -zxvf filename.tar.gz

If you have a .tar compressed file type:
tar -xvjf filename.tar

I have troubles remembering which is which, so if one fails I try the other.

Last edited by alar; 11-05-2011 at 10:03 PM.
 
Old 11-05-2011, 11:39 PM   #6
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,393

Rep: Reputation: 2014Reputation: 2014Reputation: 2014Reputation: 2014Reputation: 2014Reputation: 2014Reputation: 2014Reputation: 2014Reputation: 2014Reputation: 2014Reputation: 2014
Quote:
Originally Posted by alar View Post
There are usually two types of tarfiles available for extraction. There is the .tar.gz format and the .tar format

If you have a .tar.gz file, type:
tar -zxvf filename.tar.gz

If you have a .tar compressed file type:
tar -xvjf filename.tar

I have troubles remembering which is which, so if one fails I try the other.
-z decompresses, which means a .tar.gz archive. Should be pretty simple to keep them separate.

tar -zxvf for .tar.gz archives
tar -xvf for .tar archives

-z adds (de)compression.

Alternatively you can gunzip a .tar.gz archive to get a .tar archive, then tar -xvf it like normal.
 
Old 11-06-2011, 05:21 AM   #7
teebones
Member
 
Registered: Aug 2005
Location: /home/teebones
Distribution: sometimes this, sometimes that..
Posts: 502

Rep: Reputation: 56
you also have the bzip2 tarballs: tar.bz2

To extract them you can issue this command: tar -xvjf bestand.tar.bz2 (the j is the bzip2 format)
 
Old 11-06-2011, 11:46 AM   #8
dsplayer14
Member
 
Registered: Nov 2011
Distribution: Arch Linux and Slackware 13.37
Posts: 127

Original Poster
Rep: Reputation: 1
Whats the difference between tar.gz tar.bz2 and any other types of tarballs?
 
Old 11-06-2011, 12:17 PM   #9
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,393

Rep: Reputation: 2014Reputation: 2014Reputation: 2014Reputation: 2014Reputation: 2014Reputation: 2014Reputation: 2014Reputation: 2014Reputation: 2014Reputation: 2014Reputation: 2014
Different types of compression

.tar is a normal uncompressed archive
.tar.gz is an archive compressed with gzip
.tar.bz2 is an archive compressed with bzip2
 
Old 11-06-2011, 12:24 PM   #10
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
You can also use xz compression. It compresses slower, but produces smaller files and decompresses faster.

Also, you don't need to use the "z", "j", or "J" (xz) flags for newer versions of tar.
 
  


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
Stage Tarball SBN Gentoo 4 07-02-2009 04:12 PM
Why tarball is better than rpm maxy7710 Linux - Newbie 8 04-29-2008 09:12 AM
After Tarball then what ? sevvy8 Linux - Newbie 2 03-29-2004 03:41 AM
tarball error rooman Linux - Newbie 3 04-15-2003 03:50 AM
Tarball? HardcoreGamer Linux - Software 4 02-12-2003 02:26 PM


All times are GMT -5. The time now is 06:32 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