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

Install Remi and EPEL yum repo Centos 7

Install Yum EPEL and Remi repositories on Centos 7 Adding additional useful repo's on Centos 6...

Install Apache Web Server Centos 7

Install Apache Web Server on Centos 7 The Apache HTTP Server Project is an effort to...

MySQL - Check Which Query is Consuming Resources

MySQL - Checking Which Query is Consuming Resources Have you ever wondered which mysql query...

CentOS 7 KVM Template Disk Space Fix

NOTE: This ONLY applies to KVM VPS clients, not OpenVZAfter reinstalling your OS using the CentOS...

How to install Tomcat6 Server on Centos6

How to install Tomcat6 Server on Centos6 Tomcat is an Opensource webserver and used for Java...