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
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop











{ 13 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)
really a good post
I want to extract sysbench-0.4.12.5.tar.gz that i wget from SourceForge but got this error. Please help.
[root@cdn temp]# tar -zxvf sysbench-0.4.12.5.tar.gz
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors
I have the same problem when trying to extract flashplayer 11 plugin, help please.. :’(
tar: install_flash_player_11_linux.x86_64.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Exiting with failure status due to previous errors