How to Unzip a Tar.gz in Linux
Tar is a file archive format that was originally used with magnetic tape storage systems. Unlike with other formats, tar archives are uncompressed, and so are often compressed using the Gzip format before distribution over the Internet as tar.gz files. Tar is also the name of a program used to work with tar archives, and according to DistroWatch is packaged by default with all of the 10 most widely used Linux distributions.
Instructions
-
-
1
Open a command line interface terminal if you are using a graphical interface. In most cases, the Terminal application can be found in one of the major program categories by default.
-
2
Run tar using the following command:
tar -xzf /filepath/filename.tar.gz
where "/filepath" is a reference to the directory that contains the tar.gz file, and "filename" is the name of the file. The "z" option is important, as it specifies that the file should be unzipped before unpacking the tar archive.
-
-
3
Wait for the process to complete, then find your unpacked files in the same directory as the tar.gz file. For large files that take time to unpack, add "v" to the options to receive more detailed output throughout the unpacking process.
-
1
References
- Photo Credit tape image by Frank-Peter Funke from Fotolia.com