Howto uncompress a .TAR.GZ file in the Linux terminal

By conner_bw on 2009-08-21 11:05:27

I use MacOSX . By default, I use .ZIP compression or .DMG images (Death to .SIT files). Every once in a while I have to administer a Linux box and I run into a TAR or a TAR.GZ file, but I alway forget how to uncompress it. As a favour to myself, and to avoid searching for the term "How do I unzip a TAR.GZ file?" I'm jotting, this down for all future generations too lazy to read the man page.

TAR is a compression technology used to create a Tape ARchive files. The resulting file is known as a tarball. To uncompress it use:

tar xvf filename.tar

If the tarball has also been gzipped, it will have the extension TAR.GZ and you can use the following command:

tar xvfz filename.tar.gz

Roll credits:

x = extract files from an archive
v = verbosely list files processed
f = use archive file or device F
z = filter the archive through gzip

Permanent Link, Comments (0) Tags: Uncompress, Unzip, Tar, Gz

Slashdot Facebook Twitter Myspace StumbleUpon

Unless otherwise specified, contents of this site are copyright by the contributors and available under the
Creative Commons Attribution 3.0. Contributors should be attributed by full name or nickname.