How To Untar a Tarball .tar or .tar.gz File In Linux Shell Command
How To Untar a Tarball .tar or .tar.gz File In Linux Shell Command
By: Travis The Admin
Today I will show you how to uncompress a tarball. Tarballs are files with a .tar extension. The most common extension in linux that I see is the .tar.gz. But if you dont have a Linux Box, then you most likely have a Windows PC. If so, you can use Winzip to uncompress the tar ball and maybe you can give Linux a try - Its great! and Best of all, Its FREE!. Else, If you are not familiar with the Linux Shell Command, and you have a linux computer or server continue on reading this how to guide tutorial...
These commands are useful on linux, if you are an admin, you will defenetly need these. so take notes.
or you can bookmark this page better!
so here we go:
tar is a compression technology used to create a Tape ARchive. The resulting file is known as a tarball. If you are fimiliar with Window, this is the same as a Zip file. You use winzip to compress and uncompress .zip files.So its the same idea. To uncompress the files (or to get the files out of a tarball), you can use the following commands:
| tar xvf filename.tar |
If the tarball has also been gzipped (compressed), you can use the following command:
tar xvfz filename.tar.gz |
If you only want certain directories from the tarball, do this:
tar xvzf filename.tar.gz */dir.you.want/* |
If you have a .tar.bz2 file, then you need bzip2 installed (/usr/ports/archivers/bzip2), and you issue this command:
tar yxf filename.tar.bz2 |
Hope this helps
Posted on: Apr 08, 2006
|
|
|
# 123421 Reply By seo On Tue Dec 15, 2009 11:39 am
travis, your advice was spot on. you helped me upgrade my wp blog. thanks.
# 112446 Reply By Don On Wed Aug 12, 2009 6:46 am
hi. i'm new to linux (freespire 2.0.3). i d-loaded the new adobe flash player and i can't seem to untar it, even following your instructions. i keep getting an error message> bash:syntax error near unexpected token '(' < what does that mean? any help you could give would really be appreciated. thanx
# 109489 Reply By rafiya On Wed Jul 15, 2009 7:05 pm
this tutorial will definitely help me
# 104351 Reply By atnlie On Tue May 26, 2009 1:30 am
thanks bro.
# 101089 Reply By Michael On Wed Apr 22, 2009 7:32 am
great thanks for that! even 5 years on it still worked a treat!
# 79533 Reply By robert On Thu Nov 06, 2008 4:15 am
thanks for the help in this. i am doing a project in college to design a dns server in red hat linux so im using the bind program it comes in a gz format so i was wondering how to get it. im running ubuntu 8.04 and i love it ill let you know how it turns out. thanks agian.