How to use ‘Tar’ and ‘Zip’ to compress files

The information in this article is related to konsoleH.
If you are using our new Control Panel, refer to this article.

Make the switch and discover a simpler, more secure way to manage your hosting.

Tar and zip commands are often used to compress a website’s content to a single smaller file to use less disk space and to expedite the download process of a large number of files. ‘Tar’ is the most common form for Unix and ‘zip’ is the most common form for Windows. However, ‘zip’ and ‘tar’ have both been ported to all computer platforms.

The following file compression methods are available with xneelo:

1. konsoleH ‘File Manager’ tool (Zip):

  1. Browse to konsoleH and log in (Admin or Domain level)
  2. Select or search for a domain name in the Hosting Service tab
  3. Select Manage Services from the left-hand menu
  4. Select File Manager
  5. Select the file or folder which should be compressed
  6. Select Zip File from the right navigation bar

Your public_html directory (all web content) can be compressed (zipped):

  1. Browse to konsoleH and log in (Admin or Domain level)
  2. Select or search for a domain name in the Hosting Service tab
  3. Select Manage Services from the left-hand menu
  4. Select File Manager
  5. Select Go to Home Folder
  6. Click Expanded View
  7. Select the public_html folder
  8. Select Zip File from the right navigation bar


2. Telnet or SSH (Tar and Zip)

To compress content within the public_html directory from a command line (Telnet or SSH) : (where [ ] indicates a filename of the user’s choice)

Tar Compress individual files:

  1. SSH / Telnet to the web server
  2. Change to the public_html directory
  3. run: tar -zcvf [tar_file_name.tar.gz] (file1) (file2) etc.[a-zA-Z0-9]*
    • Eg. tar -zcvf testcontent.tar.gz index.html info.php

Tar Compress all public_html content (all web content):

  1. SSH / Telnet to the web server
  2. Change to the public_html directory
  3. tar -zcvf [tar_file_name.tar.gz] * .[a-zA-Z0-9]*

ZIP Compress individual files:

  1. SSH / Telnet to the web server
  2. Change to the public_html directory
  3. run: zip -rqv [zip_filename.zip] (file1) (file2) etc. .[a-zA-Z0-9]*
    • Eg. zip -rqv testcontent.zip index.html info.php

ZIP Compress all public_html content (all web content):

  1. SSH / Telnet to the web server
  2. Change to the public_html directory
  3. run: zip -rqv [zip_filename.zip] * .[a-zA-Z0-9]*

Extracting files from a zip or tar involves a similar process.