Tutorial Extracting a tarball (a compressed tar file)
In the last tutorial, we created the compressed tar file “bu072311.tar.gz” known as a tarball. In this tutorial, we will show you how to extract this tarball file.
We will first show you how to extract the file in Windows and then in Linux.
Extracting a compressed tar file in Windows
First uncompress the file “bu072311.tar.gz” with 7-zip.
Then you can untar the extracted tar file back into its original files and folders. Using 7-zip again.
Look inside the extracted folders and you should see individual files inside as well.
Extracting a compressed tar file in Linux
First gunzip the file “bu072311.tar.gz” with the command …
gunzip bu072311.tar.gz
Note that the command is gunzip and not ungzip. Now the file bu072311.tar.gz has been transformed to bu072311.tar which indicates that it has been un-compressed.
Next extract the contents of the tar file bu072311.tar by the command …
tar -xvf bu072311.tar
You should get back all the original file that was placed into the compressed tar file. The -x flag option tells the tar utility to perform an extraction. The “v” verbose flag tells it to display the filenames to the screen as they are being processed. The “f” just indicate that the next parameter that follows (in our case it is bu072311.tar) is the file to be processed on.