Q. How do I extract tar.gz file under Linux / UNIX like operating systems?
A. tar.gz is nothing but compressed tar archive.
The tar program provides the ability to create tar archives, as well as various other kinds of manipulation. For example, you can use Tar on previously created archives to extract files, to store additional files, or to update or list files which were already stored.
Initially, tar archives were used to store files conveniently on magnetic tape. The name "Tar" comes from this use; it stands for tape archiver. Despite the utility's name, Tar can direct its output to available devices, files, or other programs (using pipes), it can even access remote devices or files (as archives).
Extract tr.gz. file
To extract one or more members from an archive, enter:
tar -zxvf {file.tar.gz}
If your tarball name is backup.tar.gz, enter the following at a shell prompt:
tar -zxvf backup.tar.gz
Extracting an Entire Archive
To extract an entire archive, specify the archive file name only, with no individual file names as arguments.
tar -zxvf backup.tar.gz
Featured Articles:
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- My 10 UNIX Command Line Mistakes
- Linux: 20 Iptables Examples For New SysAdmins

- 25 PHP Security Best Practices For Sys Admins
- The Novice Guide To Buying A Linux Laptop
- 10 Greatest Open Source Software Of 2009
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- Top 20 OpenSSH Server Best Security Practices
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Linux Video Editor Software
Facebook it - Tweet it - Print it -


{ 10 comments… read them below or add one }
use the followinf command:
tar -xvf
Directory Checksum error.
Using on SunOS 2.6
How to extract without screen output?
tar -zxf,
ie leave out ‘v’, it stands for verbose
Cool!
I kept leaving the f (for file) out and tar would just sit there!
Great sharing. I really appreciate the idea you gave! Lots of thanks!
great share thnx man
its very useful for linux user….thanks
when I am trying to tar a .tar.gz file using the all kind of command as ststed above it is showing that 1) tar: child returned status 1
2) tar: errors exit delayed from previous error
using centos 64 bit OS
It is working in AIX if you give as tar -zxvf *.tar.gz (Actual Tar file)