Go Back   TechArena Community > Software > Operating Systems
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , ,

Sponsored Links



Extract tar files in Linux

Operating Systems


Reply
 
Thread Tools Search this Thread
  #1  
Old 26-05-2009
Member
 
Join Date: Jan 2009
Posts: 51
Extract tar files in Linux

I am trying to learn Linux Operating System and after a short research i came to know Ubuntu is the easiest to learn. I so installed Ubuntu 9.04. Well i came to know about "tar" files. What i know is, It is a type of Archive File. Can anyone help me about this archive and softwares that can extract this type of archive on Ubuntu Linux. Thanks!
Reply With Quote
  #2  
Old 26-05-2009
Lillebror's Avatar
Member
 
Join Date: Apr 2008
Posts: 3,259
Re: Extract tar files in Linux

The program tar, originally stands for tape archive, is useful for archiving files. It is a program and not just a command. It is included with all the Linux Distributions. It is the native program which is a command line interface. You can use the single command "tar" to create archive, view its content and also to extract the files from tar archive.
Reply With Quote
  #3  
Old 26-05-2009
Member
 
Join Date: Jan 2009
Posts: 51
Re: Extract tar files in Linux

Thanks for the description. But can you provide me with some help to use the tar progarm/command? Would be really helpful. Does this program runs with all linux distributions similarly or there are changes for different linux distributions? Thanks!
Reply With Quote
  #4  
Old 26-05-2009
Calvin K's Avatar
Member
 
Join Date: Apr 2008
Posts: 3,479
Re: Extract tar files in Linux

Note : A ".tar" file is not a compressed files, it is just a collection of files within a single file. If the file is a ".tar.gz" or ".tgz" then its a collection of many files in a single file which is compressed. The file ".tgz" or ".tar.gz" represents a tarball file.

Creating a tar file :

Code:
tar -cvzf file1.tar file2.txt
c : to create archive
v : verbose mode output
z : compress file
f : specify file or file group

You can use wild card characters to tar a group of files by *.[file extension]

Example :
Code:
tar -cvzf file1.tar *.txt *.doc
The above command will create (c) verbose mode (v) tar archive and compress (z) files specified (f) in the command. All the .txt and .doc files will be archived.

Extracting the files from a tar file :

To extract an uncompressed tar file :

Code:
tar -xvvf file1.tar
This will Extract the files in tar files in the current location.

To extract a compressed tarball file :

Code:
tar -xvvzf myfile.tar.gz
Reply With Quote
Reply

  TechArena Community > Software > Operating Systems


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Extract tar files in Linux"
Thread Thread Starter Forum Replies Last Post
Unable to extract .exe files from .rar file GunPower Windows Software 6 25-06-2011 10:22 PM
Extract DMG files superdave1984 Windows Software 3 26-10-2009 09:50 AM
How do i extract .zip files on Linux Mind It Windows Software 3 24-09-2009 02:21 PM
How can i extract multiple RAR files Common Windows Software 3 04-07-2009 12:49 AM
How to extract images from PDF files ? Bilal Windows Software 3 14-04-2009 01:11 PM


All times are GMT +5.5. The time now is 02:33 AM.