How to extract a tar.gz file

So you have went to that website and downloaded the latest version of your files. But they are in a tar.gz format, How do you extract them to your site.

First what is a tar.gz file, this just means that the tar has been compressed.

Say you want to extract the tar you just download called lastest.tar.gz from wordpress.

tar -zxvf latest.tar.gz
  • -z : Uncompress the resulting archive with gzip command
  • -x : Extract to disk from archive
  • -v : Verbose..aka show you what its doing
  • -f : Read the archive from the called latest.tar.gz

By default this will get extracted into your current directory

What if you want it moved to your html directory

tar -zxvf latest.tar.gz -C /var/www/html

What if you just want to view the files in the tar.gz but don't want to extract them yet

tar -tzvf latest.tar.gz
  • -t : List the contents of the archive
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How do I SSH into my VPS? (Windows/Putty)

This article will teach you how to access your server via SSH using the PuTTY client on Windows....

Setup a SSH Tunnel for Secure Browsing

Setup a SSH Tunnel to Secure your Browsing on a Public Network Have you been sitting at your...

How to block Bittorent traffic with IPTables

How to Block Bittorrent Traffic with IPtables IPTABLES is a user-space application program...

How to block a bot by User Agent Sting

How to block a bot by User Agent Sting Do you have those bandwidth hogging bots as much as...

Reset your MySQL Admin Password

How to reset your MySQL Admin Password You have installed MySQL and now you are having a hard...