{"id":7320,"date":"2020-02-18T10:22:43","date_gmt":"2020-02-18T15:22:43","guid":{"rendered":"https:\/\/www.pair.com\/support\/kb\/?post_type=ht_kb&#038;p=7320"},"modified":"2020-02-18T10:22:47","modified_gmt":"2020-02-18T15:22:47","slug":"compressed-files-using-zip-and-tar-gz-on-pair-servers","status":"publish","type":"ht_kb","link":"https:\/\/www.pair.com\/support\/kb\/compressed-files-using-zip-and-tar-gz-on-pair-servers\/","title":{"rendered":"Compressed Files: Using .ZIP and TAR.GZ on Pair Servers"},"content":{"rendered":"<h3>What is File Compression?<\/h3>\n<p><span style=\"font-weight: 400;\">File compression is the process of taking several (or many) files and combining them into one, smaller file. This smaller file can then be uncompressed and returned to their separate, regular sized files.\u00a0<\/span><\/p>\n<h3>When Should I Use File Compression?<\/h3>\n<p><span style=\"font-weight: 400;\">There are various reasons to compress files, but the foremost is that you want to make the file more manageable. By compressing, you make the file size smaller, and, if there are multiple files, they are grouped together. This grouped together file is called an archive file.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If, for example, you wanted to send a few pictures via email to a friend, you might find that the pictures take a <\/span><i><span style=\"font-weight: 400;\">long<\/span><\/i><span style=\"font-weight: 400;\"> time to send because their file size is so large.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">So the natural thing to do would be to make the file size smaller. You can do that by compressing the images.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Likewise, if you wanted to quickly download the contents of a directory on your hosting account (for example, your entire <\/span><i><span style=\"font-weight: 400;\">public_html<\/span><\/i><span style=\"font-weight: 400;\"> directory), you could create a compressed version of that, then download the entire archive file in one go. That way you don't need to copy multiple files or worry about the transfer size.\u00a0<\/span><\/p>\n<h3>What's the difference between .ZIP, and TAR.GZ files?<\/h3>\n<p><span style=\"font-weight: 400;\">There are different kinds of compression, so it's important to make sure that you use the best compression method for your situation. Here are some popular ones:<\/span><\/p>\n<h4>.ZIP<\/h4>\n<p><span style=\"font-weight: 400;\">.ZIP is one of the most popular compression methods, known for its quick compression and extraction times. It's suitable for both Windows and Mac users.<\/span><\/p>\n<h4>TAR.GZ<\/h4>\n<p><span style=\"font-weight: 400;\">TAR.GZ is great for Unix users and by extension, Mac users. Many MacOS versions allow you to double-click a TAR.GZ file to extract it. However, if you are a Window's user,\u00a0 you will need additional software to extract a TAR.GZ file.<\/span><\/p>\n<h3>How to Compress Files in the ACC<\/h3>\n<p><span class=\"s1\"><a style=\"color:#fff; text-decoration:none!important;\" href=\"https:\/\/www.pair.com\/support\/kb\/tags\/shared-hosting\/\"><p style=\"background-color:#1a3d6e !important;color:#fff;padding:6px; display:inline-block!important;font-size:12px;font-weight:bold; border-radius:3px;\">Shared<\/p><\/a> <a style=\"color:#fff; text-decoration:none!important;\" href=\"https:\/\/www.pair.com\/support\/kb\/tags\/vps\/\"><p style=\"background-color:#1a3d6e !important;color:#fff;padding:6px; display:inline-block!important;font-size:12px;font-weight:bold; border-radius:3px;\">VPS<\/p><\/a> <a style=\"color:#fff; text-decoration:none!important;\" href=\"https:\/\/www.pair.com\/support\/kb\/tags\/qs-dedicated\/\"><p style=\"background-color:#1a3d6e !important;color:#fff;padding:6px; display:inline-block!important;font-size:12px; font-weight:bold; border-radius:3px;\">Dedicated<\/p><\/a><\/span><\/p>\n<p><span style=\"font-weight: 400;\">The Account Control Center (ACC) in Shared, VPS, and Dedicated accounts allows you to compress files right in the interface. This process does not require any use of the command line. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">However, this method does <\/span><b>not<\/b><span style=\"font-weight: 400;\"> work on WP Enthusiast or WP Professional accounts.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0If you would prefer a method that does not use the command line <strong>and<\/strong> you are using a Shared, VPS, or Dedicated account, see our article: <\/span><a href=\"https:\/\/www.pair.com\/support\/kb\/how-to-take-manual-file-backups-on-shared-vps-and-qs-dedicated\/\"><span style=\"font-weight: 400;\">How to Take Manual File Backups on Shared, VPS, and Dedicated Accounts<\/span><\/a><\/p>\n<h3>How to Compress Files via the Command Line<\/h3>\n<p><span class=\"s1\"><a style=\"color:#fff; text-decoration:none!important;\" href=\"https:\/\/www.pair.com\/support\/kb\/tags\/shared-hosting\/\"><p style=\"background-color:#1a3d6e !important;color:#fff;padding:6px; display:inline-block!important;font-size:12px;font-weight:bold; border-radius:3px;\">Shared<\/p><\/a> <a style=\"color:#fff; text-decoration:none!important;\" href=\"https:\/\/www.pair.com\/support\/kb\/tags\/vps\/\"><p style=\"background-color:#1a3d6e !important;color:#fff;padding:6px; display:inline-block!important;font-size:12px;font-weight:bold; border-radius:3px;\">VPS<\/p><\/a> <a style=\"color:#fff; text-decoration:none!important;\" href=\"https:\/\/www.pair.com\/support\/kb\/tags\/qs-dedicated\/\"><p style=\"background-color:#1a3d6e !important;color:#fff;padding:6px; display:inline-block!important;font-size:12px; font-weight:bold; border-radius:3px;\">Dedicated<\/p><\/a> <a style=\"color:#fff; text-decoration:none!important;\" href=\"https:\/\/www.pair.com\/support\/kb\/tags\/wp-enthusiast\/\"><p class=\"\"style=\"background-color:#1a3d6e!important;color:#fff !important;padding:6px; display:inline-block!important;font-size:12px;font-weight:bold; border-radius:3px;\">WP Enthusiast<\/p><\/a> <a style=\"color:#fff; text-decoration:none!important;\" href=\"https:\/\/www.pair.com\/support\/kb\/tags\/wp-professional\/\"><p style=\"background-color:#1a3d6e !important;color:#fff !important;padding:6px; display:inline-block!important;font-size:12px;font-weight:bold; border-radius:3px;\">WP Professional<\/p><\/a> <a style=\"color:#fff; text-decoration:none!important;\" href=\"https:\/\/www.pair.com\/support\/kb\/tags\/wp-professional-plus\/\"><p style=\"background-color:#1a3d6e !important;color:#fff !important;padding:6px; display:inline-block!important;font-size:12px;font-weight:bold; border-radius:3px;\">WP Professional Plus<\/p><\/a><\/span><\/p>\n<p><span style=\"font-weight: 400;\">You can compress and extract files within your Pair hosting account. To do so,<\/span><b> you must first <\/b><a href=\"https:\/\/www.pair.com\/support\/kb\/connecting-with-ssh\/\"><b>connect to your Pair hosting account via SSH<\/b><\/a><b>.\u00a0<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Once you have connected, find your desired compression method below, then use their commands to compress and extract files.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Note that these commands will compress and extract the files within the hosting account's file system. If you want to download the files, we recommend you either use SSH or <\/span><a href=\"https:\/\/www.pair.com\/support\/kb\/uploading-files-using-ftp\/\"><span style=\"font-weight: 400;\">SFTP<\/span><\/a><span style=\"font-weight: 400;\">.\u00a0<\/span><\/p>\n<h4>.ZIP Compression and Extraction Commands<\/h4>\n<p><span style=\"font-weight: 400;\">To compress or extract with .ZIP files, use the following commands in your command line:<\/span><\/p>\n<p><b>To Compress:<\/b><\/p>\n<pre><span style=\"font-weight: 400;\">zip -v <\/span><i><span style=\"font-weight: 400;\">newfilename<\/span><\/i><span style=\"font-weight: 400;\">.zip <\/span><i><span style=\"font-weight: 400;\">file1.ext<\/span><\/i><\/pre>\n<p><span style=\"font-weight: 400;\">Be sure to replace the following from the command:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><i><span style=\"font-weight: 400;\">newfilename<\/span><\/i><\/td>\n<td><span style=\"font-weight: 400;\">Replace with the name you want the compressed file to be called<\/span><\/td>\n<\/tr>\n<tr>\n<td><i><span style=\"font-weight: 400;\">File1.ext<\/span><\/i><\/td>\n<td><span style=\"font-weight: 400;\">Replace with the file that you want to be compressed<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><b>To Extract<\/b><span style=\"font-weight: 400;\">:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">unzip <\/span><i><span style=\"font-weight: 400;\">filename.zip<\/span><\/i><\/pre>\n<p><span style=\"font-weight: 400;\">Be sure to replace the following from the command:\u00a0<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><i><span style=\"font-weight: 400;\">filename.zip<\/span><\/i><\/td>\n<td><span style=\"font-weight: 400;\">Replace with the name of the compressed tar.gz file you want to extract. Note that this command will <\/span><b>not<\/b><span style=\"font-weight: 400;\"> work on other compression types<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>TAR.GZ Compression and Extraction Commands<\/h4>\n<p><b>To Compress:<\/b><\/p>\n<pre><span style=\"font-weight: 400;\">tar -cvzf <\/span><i><span style=\"font-weight: 400;\">newfilename<\/span><\/i><span style=\"font-weight: 400;\">.tar.gz <\/span><i><span style=\"font-weight: 400;\">file1.ext<\/span><\/i><\/pre>\n<p><span style=\"font-weight: 400;\">Be sure to replace the following from the command:\u00a0<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><i><span style=\"font-weight: 400;\">newfilename<\/span><\/i><\/td>\n<td><span style=\"font-weight: 400;\">Replace with the name you want the compressed file to be called<\/span><\/td>\n<\/tr>\n<tr>\n<td><i><span style=\"font-weight: 400;\">File1.ext<\/span><\/i><\/td>\n<td><span style=\"font-weight: 400;\">Replace with the file that you want to be compressed<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><b>To Extract<\/b><span style=\"font-weight: 400;\">:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">tar -xvzf<\/span> <i><span style=\"font-weight: 400;\">filename.tar.gz<\/span><\/i><\/pre>\n<p><span style=\"font-weight: 400;\">Be sure to replace the following from the command:\u00a0<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><i><span style=\"font-weight: 400;\">filename.tar.gz<\/span><\/i><\/td>\n<td><span style=\"font-weight: 400;\">Replace with the name of the compressed tar.gz file you want to extract. Note that this command will <\/span><b>not<\/b><span style=\"font-weight: 400;\"> work on other compression types<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is File Compression? File compression is the process of taking several (or many) files and combining them into one, smaller file. This smaller file can then be uncompressed and returned to their separate, regular sized files.\u00a0 When Should I Use File Compression? There are various reasons to compress files,&#8230;<\/p>\n","protected":false},"author":11,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":[],"ht-kb-category":[4],"ht-kb-tag":[178,176,177,179,180,199],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Compressed Files: Using .ZIP and TAR.GZ on Pair Servers - Knowledge Base - Pair Networks<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pair.com\/support\/kb\/compressed-files-using-zip-and-tar-gz-on-pair-servers\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Compressed Files: Using .ZIP and TAR.GZ on Pair Servers - Knowledge Base - Pair Networks\" \/>\n<meta property=\"og:description\" content=\"What is File Compression? File compression is the process of taking several (or many) files and combining them into one, smaller file. This smaller file can then be uncompressed and returned to their separate, regular sized files.\u00a0 When Should I Use File Compression? There are various reasons to compress files,...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pair.com\/support\/kb\/compressed-files-using-zip-and-tar-gz-on-pair-servers\/\" \/>\n<meta property=\"og:site_name\" content=\"Knowledge Base - Pair Networks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/pairnetworks\/\" \/>\n<meta property=\"article:modified_time\" content=\"2020-02-18T15:22:47+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@pairNetworks\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.pair.com\/support\/kb\/compressed-files-using-zip-and-tar-gz-on-pair-servers\/\",\"url\":\"https:\/\/www.pair.com\/support\/kb\/compressed-files-using-zip-and-tar-gz-on-pair-servers\/\",\"name\":\"Compressed Files: Using .ZIP and TAR.GZ on Pair Servers - Knowledge Base - Pair Networks\",\"isPartOf\":{\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#website\"},\"datePublished\":\"2020-02-18T15:22:43+00:00\",\"dateModified\":\"2020-02-18T15:22:47+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pair.com\/support\/kb\/compressed-files-using-zip-and-tar-gz-on-pair-servers\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pair.com\/support\/kb\/compressed-files-using-zip-and-tar-gz-on-pair-servers\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pair.com\/support\/kb\/compressed-files-using-zip-and-tar-gz-on-pair-servers\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.pair.com\/support\/kb\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Compressed Files: Using .ZIP and TAR.GZ on Pair Servers\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#website\",\"url\":\"https:\/\/www.pair.com\/support\/kb\/\",\"name\":\"Knowledge Base - Pair Networks\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.pair.com\/support\/kb\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#organization\",\"name\":\"Pair Networks\",\"url\":\"https:\/\/www.pair.com\/support\/kb\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2022\/02\/Gb_TUkUE_400x400.jpeg\",\"contentUrl\":\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2022\/02\/Gb_TUkUE_400x400.jpeg\",\"width\":360,\"height\":360,\"caption\":\"Pair Networks\"},\"image\":{\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/pairnetworks\/\",\"https:\/\/twitter.com\/pairNetworks\",\"https:\/\/www.instagram.com\/pairnetworks\/\",\"https:\/\/www.linkedin.com\/company\/2269676\/\",\"https:\/\/www.pinterest.com\/pairnetworksinc\/pins\/\",\"https:\/\/www.youtube.com\/user\/pairnetworks\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Compressed Files: Using .ZIP and TAR.GZ on Pair Servers - Knowledge Base - Pair Networks","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pair.com\/support\/kb\/compressed-files-using-zip-and-tar-gz-on-pair-servers\/","og_locale":"en_US","og_type":"article","og_title":"Compressed Files: Using .ZIP and TAR.GZ on Pair Servers - Knowledge Base - Pair Networks","og_description":"What is File Compression? File compression is the process of taking several (or many) files and combining them into one, smaller file. This smaller file can then be uncompressed and returned to their separate, regular sized files.\u00a0 When Should I Use File Compression? There are various reasons to compress files,...","og_url":"https:\/\/www.pair.com\/support\/kb\/compressed-files-using-zip-and-tar-gz-on-pair-servers\/","og_site_name":"Knowledge Base - Pair Networks","article_publisher":"https:\/\/www.facebook.com\/pairnetworks\/","article_modified_time":"2020-02-18T15:22:47+00:00","twitter_card":"summary_large_image","twitter_site":"@pairNetworks","twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.pair.com\/support\/kb\/compressed-files-using-zip-and-tar-gz-on-pair-servers\/","url":"https:\/\/www.pair.com\/support\/kb\/compressed-files-using-zip-and-tar-gz-on-pair-servers\/","name":"Compressed Files: Using .ZIP and TAR.GZ on Pair Servers - Knowledge Base - Pair Networks","isPartOf":{"@id":"https:\/\/www.pair.com\/support\/kb\/#website"},"datePublished":"2020-02-18T15:22:43+00:00","dateModified":"2020-02-18T15:22:47+00:00","breadcrumb":{"@id":"https:\/\/www.pair.com\/support\/kb\/compressed-files-using-zip-and-tar-gz-on-pair-servers\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pair.com\/support\/kb\/compressed-files-using-zip-and-tar-gz-on-pair-servers\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.pair.com\/support\/kb\/compressed-files-using-zip-and-tar-gz-on-pair-servers\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pair.com\/support\/kb\/"},{"@type":"ListItem","position":2,"name":"Compressed Files: Using .ZIP and TAR.GZ on Pair Servers"}]},{"@type":"WebSite","@id":"https:\/\/www.pair.com\/support\/kb\/#website","url":"https:\/\/www.pair.com\/support\/kb\/","name":"Knowledge Base - Pair Networks","description":"","publisher":{"@id":"https:\/\/www.pair.com\/support\/kb\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pair.com\/support\/kb\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.pair.com\/support\/kb\/#organization","name":"Pair Networks","url":"https:\/\/www.pair.com\/support\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pair.com\/support\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2022\/02\/Gb_TUkUE_400x400.jpeg","contentUrl":"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2022\/02\/Gb_TUkUE_400x400.jpeg","width":360,"height":360,"caption":"Pair Networks"},"image":{"@id":"https:\/\/www.pair.com\/support\/kb\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/pairnetworks\/","https:\/\/twitter.com\/pairNetworks","https:\/\/www.instagram.com\/pairnetworks\/","https:\/\/www.linkedin.com\/company\/2269676\/","https:\/\/www.pinterest.com\/pairnetworksinc\/pins\/","https:\/\/www.youtube.com\/user\/pairnetworks"]}]}},"_links":{"self":[{"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb\/7320"}],"collection":[{"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/comments?post=7320"}],"version-history":[{"count":4,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb\/7320\/revisions"}],"predecessor-version":[{"id":7324,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb\/7320\/revisions\/7324"}],"wp:attachment":[{"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/media?parent=7320"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb-category?post=7320"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb-tag?post=7320"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}