How to UnTar a Tar file

Ok then, since the first post was about using tar to compress files, I though it would be a good idea to know how to uncompress them as well. So, you have the file backup.tar and want to unpack it.

cd <destination path>
tar -xvf backup.tar.gz


tar -xvf backup.tar.gz -C <destination path>

Command explanation:

-x eXtract files and folders
-v Verbose mode. Not needed but it’s nice to see the files being extracted
-f File. The tar file to extract
-C Output Path. To where should the tar file be extracted

Cheers /jima

Leave a Reply

Your email address will not be published. Required fields are marked *