{"id":204,"date":"2016-01-12T15:33:52","date_gmt":"2016-01-12T15:33:52","guid":{"rendered":"http:\/\/wp-p3d2tsa2xh.pairsite.com\/?p=204"},"modified":"2019-02-06T13:39:03","modified_gmt":"2019-02-06T18:39:03","slug":"paircloud-gzip","status":"publish","type":"ht_kb","link":"https:\/\/www.pair.com\/support\/kb\/paircloud-gzip\/","title":{"rendered":"Using gzip"},"content":{"rendered":"<p class=\"p1\"><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>\u00a0<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>In this tutorial we will be looking at the family of commands <code>gzip<\/code>, <code>gunzip<\/code> and <code>zcat<\/code>. These commands will create a compressed archive in the zip format, unzip a compressed zip archive and display the contents of a file compressed in the gz format.<\/p>\n<div class=\"bs-callout bs-callout-warning\">\n<h4 class=\"text-warning\">Important<\/h4>\n<p>The <code>gzip<\/code> command by default will zip a file and replace the original. If you don\u2019t want the original replaced then further steps are needed.<\/p>\n<\/div>\n<h3 class=\"kb\">How to use gzip to compress files<\/h3>\n<p>The basic syntax is <code>gzip filename<\/code>. This will compress the file and rename it filename.gz. The only option we will use in this tutorial is the <code>-c<\/code> option which sends the output to stdout or the screen. This will print an absolute mess to your screen so you will want to redirect this to a file. The -c option is used like this:<code> gzip -c filename &gt;filename.gz<\/code>. This allows you to leave the original file unzipped and create a fresh zip file.<\/p>\n<p>We recommend only using <code>gzip<\/code> directly if you want to zip up a single file. If you want to zip up multiple files please see our <code>tar<\/code> tutorial. The reason for this is that each file will be zipped individually whereas with tar all files are joined together and gzipped as one file. This greatly increases the efficiency of the gzip algorithm.<\/p>\n<h3 class=\"kb\">How to use gzunip to decompress archives<\/h3>\n<p><code>gunzip<\/code> operates with the same syntax as <code>gzip<\/code>. The only option we will look at is <code>-c<\/code>. To extract a <strong>.gz<\/strong> file but keep the archive you would use <code>gunzip -c filename.gz &gt;filename<\/code>.<\/p>\n<div class=\"bs-callout bs-callout-warning\">\n<h4 class=\"text-warning\">Important<\/h4>\n<p>If you receive a file in <strong>.tar.gz<\/strong> please use the <code>tar<\/code> command to extract them.<\/p>\n<\/div>\n<h2>How to use zcat<\/h2>\n<p>This program is useful for viewing rotated and compressed log files. The usage is simply <code>zcat filename.gz<\/code>. The output can be sent to <code>less<\/code> for paging. For example <code>zcat \/var\/log\/maillog.1.gz | less<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 In this tutorial we will be looking at the family of commands gzip, gunzip and zcat. These commands will create a compressed archive in the zip format, unzip a compressed zip archive and display the contents of a file compressed in the gz format. Important The gzip command by&#8230;<\/p>\n","protected":false},"author":12,"comment_status":"closed","ping_status":"open","template":"","format":"standard","meta":[],"ht-kb-category":[13],"ht-kb-tag":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Using gzip - Knowledge Base - Pair Networks<\/title>\n<meta name=\"description\" content=\"In this tutorial we will be looking at the family of commands gzip, gunzip and zcat. These commands will create a compressed archive.\" \/>\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\/paircloud-gzip\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using gzip - Knowledge Base - Pair Networks\" \/>\n<meta property=\"og:description\" content=\"In this tutorial we will be looking at the family of commands gzip, gunzip and zcat. These commands will create a compressed archive.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pair.com\/support\/kb\/paircloud-gzip\/\" \/>\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=\"2019-02-06T18:39:03+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=\"2 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\/paircloud-gzip\/\",\"url\":\"https:\/\/www.pair.com\/support\/kb\/paircloud-gzip\/\",\"name\":\"Using gzip - Knowledge Base - Pair Networks\",\"isPartOf\":{\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#website\"},\"datePublished\":\"2016-01-12T15:33:52+00:00\",\"dateModified\":\"2019-02-06T18:39:03+00:00\",\"description\":\"In this tutorial we will be looking at the family of commands gzip, gunzip and zcat. These commands will create a compressed archive.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pair.com\/support\/kb\/paircloud-gzip\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pair.com\/support\/kb\/paircloud-gzip\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pair.com\/support\/kb\/paircloud-gzip\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.pair.com\/support\/kb\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using gzip\"}]},{\"@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":"Using gzip - Knowledge Base - Pair Networks","description":"In this tutorial we will be looking at the family of commands gzip, gunzip and zcat. These commands will create a compressed archive.","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\/paircloud-gzip\/","og_locale":"en_US","og_type":"article","og_title":"Using gzip - Knowledge Base - Pair Networks","og_description":"In this tutorial we will be looking at the family of commands gzip, gunzip and zcat. These commands will create a compressed archive.","og_url":"https:\/\/www.pair.com\/support\/kb\/paircloud-gzip\/","og_site_name":"Knowledge Base - Pair Networks","article_publisher":"https:\/\/www.facebook.com\/pairnetworks\/","article_modified_time":"2019-02-06T18:39:03+00:00","twitter_card":"summary_large_image","twitter_site":"@pairNetworks","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.pair.com\/support\/kb\/paircloud-gzip\/","url":"https:\/\/www.pair.com\/support\/kb\/paircloud-gzip\/","name":"Using gzip - Knowledge Base - Pair Networks","isPartOf":{"@id":"https:\/\/www.pair.com\/support\/kb\/#website"},"datePublished":"2016-01-12T15:33:52+00:00","dateModified":"2019-02-06T18:39:03+00:00","description":"In this tutorial we will be looking at the family of commands gzip, gunzip and zcat. These commands will create a compressed archive.","breadcrumb":{"@id":"https:\/\/www.pair.com\/support\/kb\/paircloud-gzip\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pair.com\/support\/kb\/paircloud-gzip\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.pair.com\/support\/kb\/paircloud-gzip\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pair.com\/support\/kb\/"},{"@type":"ListItem","position":2,"name":"Using gzip"}]},{"@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\/204"}],"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\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/comments?post=204"}],"version-history":[{"count":4,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb\/204\/revisions"}],"predecessor-version":[{"id":6562,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb\/204\/revisions\/6562"}],"wp:attachment":[{"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/media?parent=204"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb-category?post=204"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb-tag?post=204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}