How to z extract a tar.gfile

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
  • z extract
  • 3 Users Found This Useful
Was this answer helpful?

Related Articles

What do I do if my VPS is offline or down?

Your VPS may be down or offline for a variety of reasons. In this article, we'll show you how to...

What kind of IPv6 support do you have?

Since OBHost operates out of multiple locations and datacenters, our IPv6 support varies per...

Setup vsftp with SELinux

Howto Setup vsftp with SELinux Vsftpd is a fast and secure FTP server. Installing an FTP server...

Setup Nginx PHP FPM Percona Mysql

Setup Nginx + php-fpm + Percona Mysql LEMP stack is a group of open source software to get web...

MySQL - Check Which Query is Consuming Resources

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