1. TTfile
  2. GZ File
  3. How to create a GZ archive in Linux?

How to create a GZ archive in Linux?

Creating GZ archives in linux is greatly useful when you’re creating some backups, or anything for download, especially if your Internet is quite slow.

GZ archives are often used with tar files. Tar files are archives too, but they don’t enable any compression. Gzip allows you to lower the size of a tar archive and it is recommended to use the combination. So, first of all, you need to create a tar archive of anything you like. As you deal with directories, fisrt create an archive of a directory.

7

You need to create an archive of wp-content folder. In order to do this, please type:

2

Wp-content.tar is the resulting filename of a tar archive. Your server will think some time and then content.tar will appear in your folder.

8

Now you need to gzip it. Please, pay attention to the file size on the screenshot below.

4

And now the final operation is to gzip the file with the following command:

5

This will compress your tar archive without any messages too.

6

Please pay attention to the size: the file is now compressed and ready for download.