

{"id":110791,"date":"2022-10-03T10:00:07","date_gmt":"2022-10-03T04:30:07","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=110791"},"modified":"2022-10-03T10:42:23","modified_gmt":"2022-10-03T05:12:23","slug":"gzip-command-in-linux","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/gzip-command-in-linux\/","title":{"rendered":"Gzip Command in Linux"},"content":{"rendered":"<p>In this article, you will learn all there is to the gzip command in Linux. We will start right from what gzip is, why it is used and the file format related to gzip.<\/p>\n<p>We shall also be going technical by looking at the syntax of the gzip command and discussing the various options used along with the output from the terminal. At the very end, we shall also be looking into a couple of practical examples of the gzip command in Linux.<\/p>\n<h3>What is Linux gzip?<\/h3>\n<p>Gzip is a command-line-based utility in Linux based operating system that helps compress a file or list of files in Linux. It is a very simple command that is very commonly used.<\/p>\n<p>In windows, you have the ability to zip or compress files and folders into a single zip file. You can also unzip or decompress the zip files to access the contents in them. See the similarity? Gzip is to Linux what zip is to windows.<\/p>\n<p>In windows, we know that the zip file had an extension of \u201c.zip\u201d, we also know that Linux is more powerful and better than windows, hence we get the opportunity of compressing files in Linux using gzip in either \u201c.gz\u201d or \u201c.z\u201d. Gzip also recognizes files with \u201c.tgz\u201d, \u201c.taz\u201d, \u201c.tar.gz\u201d, and \u201c.tar.Z\u201d extensions.<\/p>\n<p>Gzip was created by Jean-loup Gailly and Mark Adler. Their program was the replacement for the \u2018compress\u2019 program, which was used in the early Unix systems. They released the first version under GNU GPL, making it open source. Version 0.1 of gzip was publicly released on the 31st of October 1992.<\/p>\n<h3>Linux Gzip vs Gunzip<\/h3>\n<p>Before we go any further, let us settle the difference between these 2 very common commands &#8211; Gzip and Gunzip. Both these commands are exactly the same from head to toe, with only one single difference.<\/p>\n<p>The gzip command is used to zip files and the gunzip command is used to unzip files. It is that simple! If you want more information on the gunzip command, feel free to read my article on it.<\/p>\n<h3>What are the uses of the gzip command?<\/h3>\n<p>As we have seen, gzip is used to compress files in Linux based operating system. But why do we compress or decompress files? Let us look at the importance and uses of \u2018zipped\u2019 files.<\/p>\n<p>Let\u2019s get straight to the point, the very reason why we zip files is that zipped files take up way less storage space and can be transferred to other computers more quickly than uncompressed files making workflow efficient as we save a lot of time and storage using zip files.<\/p>\n<p>Just think about it, sharing 1 big file is any day better than sharing hundreds of small files. The best part is, that this process is completely reversible, meaning that once the files are shared to another computer, the user can unzip the files and have full control over the file just like you.<\/p>\n<p>Zip files are a boon when it comes to places where you can only send a limited amount of files, like mail, teams, and many more, instead of the single 10 file limit, you can simply attach 1 zip file, with a hundred files!<\/p>\n<h3>Syntax of linux gzip command<\/h3>\n<p>Before heading any further let us look at the syntax of the gzip command to prove a better understanding of the subsequent sections.<\/p>\n<p>The syntax for using the gzip command is shown below:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">gzip &lt;options&gt; &lt;filename&gt;<\/pre>\n<p>Let us take a closer look at the fields in the gzip command:<\/p>\n<h4>1. &lt;options&gt;<\/h4>\n<p>This field takes in a range of options that specify how the gzip command should function and print the output.<\/p>\n<h4>2. &lt;filename&gt;<\/h4>\n<p>This field takes in the name of the file you want to compress. You can also enter multiple filenames one after the other separated by a space if you want to compress multiple files.<\/p>\n<h3>Gzip file format<\/h3>\n<p>The gzip tool is based on the deflate algorithm which was intended as a replacement for LWZ and other data compression algorithms. The deflate algorithm is a combination of Huffman coding and LZ77. Gzip is also referred to as the gzip file format. Let us see what it is:<\/p>\n<p>1. The gzip file format is a 10-byte header that contains a magic number, the compression method, a 4-byte timestamp, 1 byte of header flags, compression flags, and the ID of the operating system.<\/p>\n<p>2. The file format also consists of optional extra headers as allowed by the header flags, including the original filename, the lower half of a CRC-32 checksum for the header section, an \u2018extra\u2019 field, and a comment field<\/p>\n<p>3. Gzip is a body, which contains a DEFLATE-compressed payload.<\/p>\n<p>4. Gzip is an 8-byte footer, containing the length of the original uncompressed data and a CRC-32 checksum.<\/p>\n<p>Gzip is mostly used to compress just single files. The final compressed file mostly typically has the \u2018.tar.gz\u2019 or \u2018.tgz\u2019 extensions.<\/p>\n<h3>Gzip vs Zip<\/h3>\n<p>Before we look at the options of the gzip command, let us settle another difference between 2 very similar commands &#8211; gzip and zip. This time, these 2 have a lot of differences but have 1 similarity &#8211; compressing files. Let us look at some of the differences between them:<\/p>\n<p>1. Gzip is much better than zip in terms of compression, especially when compressing a huge number of files.<\/p>\n<p>2. In gzip, we archive all the files into a single tarball before compression. However, in zip, the individual files are compressed and then added to the archive.<\/p>\n<p>3. Gzip takes a lot longer time than zip.<\/p>\n<p>4. When you are pulling a single file using the zip command, it is simply extracted, then decompressed, but with the gzip command the whole file needs to be decompressed before extracting the file you want from the archive.<\/p>\n<p>5. The reason gzip is better than zip in compression is if you archive and compress 10 identical files with ZIP and GZIP, the ZIP file would be over 10 times bigger than the resulting GZIP file!<\/p>\n<h3>Options used with Linux gzip command<\/h3>\n<p>We can use different options in the syntax of the gzip command to specify the way the output or compression of a file happens. Let us look at some of the most commonly used options:<\/p>\n<h4>1. -a<\/h4>\n<p>This option converts end-of-lines using local conventions. This command can also be written as \u2018&#8211;ascii\u2019. Please note that this option is supported only on some non-Unix systems.<\/p>\n<h4>2. -c<\/h4>\n<p>This option writes output on standard output. It keeps original files unchanged.<\/p>\n<h4>3. -d<\/h4>\n<p>This command decompressed the files. It can also be written as \u2018&#8211;decompress\u2019 or \u2018&#8211;uncompress\u2019<\/p>\n<h4>4. -f<\/h4>\n<p>This command forces decompression even if the file has multiple links or the corresponding file already exists, or if the compressed data is read from or written to a terminal. This command can also be written as \u201c&#8211;force\u201d<\/p>\n<h4>5. -L<\/h4>\n<p>This option displays the information about the gzip license.<\/p>\n<h4>6. -n<\/h4>\n<p>This option does not save the original file name and timestamp when decompressing it.<\/p>\n<h4>7. -N<\/h4>\n<p>This option is the exact opposite of the option \u2018-n\u2019, it saves the original file name and timestamp when decompressing it.<\/p>\n<h4>8. -q<\/h4>\n<p>This option suppresses all the warnings.<\/p>\n<h4>9. -r<\/h4>\n<p>This option ravel the directory structure recursively. If it finds any of the file names specified on the terminal are directories, gzip will go into the directory and uncompress all the files in it.<\/p>\n<h4>10. -S<\/h4>\n<p>This option uses the suffix \u2018.suf\u2019, instead of \u2018.gz\u2019 when decompressing.<\/p>\n<h4>11. -t<\/h4>\n<p>This option performs a test by checking the integrity of the decompressed file.<\/p>\n<h4>12. -v<\/h4>\n<p>This option provides a verbose to give a better understanding of what is happening.<\/p>\n<h4>13. -V<\/h4>\n<p>This option displays the information about the version of gzip you are using.<\/p>\n<h4>14. -h<\/h4>\n<p>This option displays the help menu, with the different options. If at all you get stuck anywhere anytime using the gzip command, just type the command \u201cgzip -h\u201d or \u201cgzip &#8211;help\u201d<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/08\/help-menu-of-the-gzip-command.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110833\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/08\/help-menu-of-the-gzip-command.webp\" alt=\"help menu of the gzip command\" width=\"780\" height=\"598\" \/><\/a><\/p>\n<p>Now that you have known the basic information of gzip and have also gone through the syntax and different options used. Let us now use this information to look into some of the practical examples of the gzip command in the terminal.<\/p>\n<h3>Compressing a file using the gzip command<\/h3>\n<p>To compress a file, use the command:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">gzip &lt;filname.gz&gt;<\/pre>\n<h4><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/08\/compressing-a-file-using-the-gzip-command.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110835\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/08\/compressing-a-file-using-the-gzip-command.webp\" alt=\"compressing a file using the gzip command\" width=\"678\" height=\"143\" \/><\/a><\/h4>\n<h4>Providing verbose while decompressing<\/h4>\n<p>In the above output, there is absolutely no proof of checking if the file has been decompressed or not, except if we type the \u2018ls\u2019 command and check the extension. It would be really helpful if we have some verbose, thankfully we can by using the option \u2018-v\u2019.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">gzip -v &lt;filename&gt;<\/pre>\n<h4><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/08\/providing-verbose-while-decompressing.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110836\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/08\/providing-verbose-while-decompressing.webp\" alt=\"providing verbose while decompressing\" width=\"715\" height=\"173\" \/><\/a><\/h4>\n<h4>Forcing gzip to decompress a file<\/h4>\n<p>To force the decompressing of the file, use the option \u2018-f\u2019 like this:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">gzip -f &lt;filename.gz&gt;<\/pre>\n<h4>Listing the contents of the compressed file<\/h4>\n<p>If you want the terminal to show you information about the compressed file, you can use the option \u2018-l\u2019. Note that this command will not decompress the file, but only show you the contents.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">gzip -l &lt;filename&gt;<\/pre>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/08\/listing-the-contents-of-the-compressed-file.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110837\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/08\/listing-the-contents-of-the-compressed-file.webp\" alt=\"listing the contents of the compressed file\" width=\"740\" height=\"214\" \/><\/a><\/p>\n<p>If the data shown in the above output is not enough, you could always ask for even more verbose by using the option \u2018-v\u2019 as shown:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">gzip -v (filename.gz)<\/pre>\n<h4><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/08\/providing-verbose-while-listing-the-contents-of-the-compressed-file.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110838\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/08\/providing-verbose-while-listing-the-contents-of-the-compressed-file.webp\" alt=\"providing verbose while listing the contents of the compressed file\" width=\"780\" height=\"156\" \/><\/a><\/h4>\n<h4>Keeping both original and compressed files.<\/h4>\n<p>If you wish to keep the original file even after compressing it, you can do it by using the option \u2018-k\u2019 as shown:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">gzip -k (filename.gz)<\/pre>\n<h4><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/08\/keeping-both-original-and-compressed-files..webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110839\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/08\/keeping-both-original-and-compressed-files..webp\" alt=\"keeping both original and compressed file .\" width=\"758\" height=\"154\" \/><\/a><\/h4>\n<h4>Displaying License of gzip<\/h4>\n<p>Use the option \u2018-L\u2019 to display the license information of gzip as shown below<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/08\/displaying-license-of-gzip.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110840\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/08\/displaying-license-of-gzip.webp\" alt=\"displaying license of gzip\" width=\"780\" height=\"167\" \/><\/a><\/p>\n<h4>Testing if a file is valid or not<\/h4>\n<p>To test if a file is valid for decompression or not, use the option \u2018-t\u2019<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/08\/testing-if-a-file-is-valid-or-not.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110841\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/08\/testing-if-a-file-is-valid-or-not.webp\" alt=\"testing if a file is valid or not\" width=\"728\" height=\"166\" \/><\/a><\/p>\n<h4>Viewing information about a file<\/h4>\n<p>To get information about either the compressed or uncompressed file, use the option \u201c-l\u201d as shown:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">gzip -l &lt;filename.gz&gt;<\/pre>\n<h4><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/08\/viewing-information-about-a-file.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110842\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/08\/viewing-information-about-a-file.webp\" alt=\"viewing information about a file\" width=\"746\" height=\"236\" \/><\/a><\/h4>\n<h4>Viewing the version of gzip<\/h4>\n<p>To display information about the version of gzip, use the option \u201c-V\u201d as shown:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">gzip -V<\/pre>\n<h4><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/08\/viewing-the-version-of-gzip.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110843\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/08\/viewing-the-version-of-gzip.webp\" alt=\"viewing the version of gzip\" width=\"780\" height=\"207\" \/><\/a><\/h4>\n<h4>Decompressing using gzip!<\/h4>\n<p>We saw that the gzip command is for compressing and the gunzip command is for decompressing, but, we can also turn to gzip into gunzip using the option \u201c-d\u201d! This means that now you can decompress a compressed file using gzip!<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">Gzip -d &lt;filename&gt;<\/pre>\n<h4><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/08\/decompressing-using-gzip.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110844\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/08\/decompressing-using-gzip.webp\" alt=\"decompressing using gzip\" width=\"716\" height=\"163\" \/><\/a><\/h4>\n<h4>Recursively compressing<\/h4>\n<p>Using the option \u201c-r\u201d, we can compress every file in a folder and its subfolders. The command \u201cgzip -r &lt;foldername&gt;\u201d traverses the directory structure and compresses each file in the folder you specified.<\/p>\n<h4>Changing compression level<\/h4>\n<p>The numbers between \u201c-1\u201d and \u201c-9\u201d allow us to change the compression level of a file. For example, you can go for a smaller compression which will work faster by using the option \u201c-1\u201d or you can go for maximum compression which takes longer to run by using the option \u201c-9\u201d.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/08\/changing-compression-level.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110845\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/08\/changing-compression-level.webp\" alt=\"changing compression level\" width=\"738\" height=\"144\" \/><\/a><\/p>\n<h4>Compressing multiple files at once<\/h4>\n<p>To compress multiple files at once, specify the names of the file one after the other separated by as spaces as shown:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">gzip &lt;file1&gt; &lt;file2&gt; &lt;file3&gt;<\/pre>\n<h4><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/08\/compressing-multiple-files-at-once.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110846\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/08\/compressing-multiple-files-at-once.webp\" alt=\"compressing multiple files at once\" width=\"780\" height=\"167\" \/><\/a><\/h4>\n<h4>Creating and compressing a directory<\/h4>\n<p>Just like we compress regular files, we can also compress directories by simply writing the name of the directory in place of the filename. Just to take think slightly up a notch, let us create and compress a directory in just one command. To do so use the syntax shown below:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">tar cf - &lt;directory&gt; | gzip &gt; &lt;directory&gt;<\/pre>\n<p>In the above command, we are creating a directory using the \u201ctar command\u201d and then piping it to the gzip command to compress it.<\/p>\n<h4>Using standard input<\/h4>\n<p>If you want to create a .gz file from the stdin, pipe the output of the command to gzip.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">mysqldump database_name | gzip -c &gt; database_name.sql.gz<\/pre>\n<h3>Summary<\/h3>\n<p>As you have seen, the gzip command is a really simple tool that helps in the efficiency of workflow. The simple process of compressing a file or directory with just a simple command is simply god sent! The way we can use gzip with the many options it comes with makes the process of compressing files so much easier.<\/p>\n<p>You have now learned what gzip is, the different uses of it, and how the tool works. We have also gone deep to understand the file format of gzip along with the syntax and different options used with the command. In the end, we have also looked at some practical examples of decompressing files.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, you will learn all there is to the gzip command in Linux. We will start right from what gzip is, why it is used and the file format related to gzip.&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":110794,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35],"tags":[27088,27089],"class_list":["post-110791","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-linux-gzip","tag-linux-gzip-vs-gunzip"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Gzip Command in Linux - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn about gzip command in linux. See its syntax, options, file format, gzip vs gunzip, gzip vs zip, Compressing file using gzip command etc\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/gzip-command-in-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Gzip Command in Linux - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn about gzip command in linux. See its syntax, options, file format, gzip vs gunzip, gzip vs zip, Compressing file using gzip command etc\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/gzip-command-in-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-10-03T04:30:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-10-03T05:12:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/linux-gzip-command.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Gzip Command in Linux - DataFlair","description":"Learn about gzip command in linux. See its syntax, options, file format, gzip vs gunzip, gzip vs zip, Compressing file using gzip command etc","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:\/\/data-flair.training\/blogs\/gzip-command-in-linux\/","og_locale":"en_US","og_type":"article","og_title":"Gzip Command in Linux - DataFlair","og_description":"Learn about gzip command in linux. See its syntax, options, file format, gzip vs gunzip, gzip vs zip, Compressing file using gzip command etc","og_url":"https:\/\/data-flair.training\/blogs\/gzip-command-in-linux\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2022-10-03T04:30:07+00:00","article_modified_time":"2022-10-03T05:12:23+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/linux-gzip-command.webp","type":"image\/webp"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/gzip-command-in-linux\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/gzip-command-in-linux\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/b49855299264df5e27e3ec6c2cd9fde9"},"headline":"Gzip Command in Linux","datePublished":"2022-10-03T04:30:07+00:00","dateModified":"2022-10-03T05:12:23+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/gzip-command-in-linux\/"},"wordCount":1986,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/gzip-command-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/linux-gzip-command.webp","keywords":["linux gzip","linux gzip vs gunzip"],"articleSection":["Linux Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/gzip-command-in-linux\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/gzip-command-in-linux\/","url":"https:\/\/data-flair.training\/blogs\/gzip-command-in-linux\/","name":"Gzip Command in Linux - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/gzip-command-in-linux\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/gzip-command-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/linux-gzip-command.webp","datePublished":"2022-10-03T04:30:07+00:00","dateModified":"2022-10-03T05:12:23+00:00","description":"Learn about gzip command in linux. See its syntax, options, file format, gzip vs gunzip, gzip vs zip, Compressing file using gzip command etc","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/gzip-command-in-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/gzip-command-in-linux\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/gzip-command-in-linux\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/linux-gzip-command.webp","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/linux-gzip-command.webp","width":1200,"height":628,"caption":"linux gzip command"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/gzip-command-in-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Linux Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/linux\/"},{"@type":"ListItem","position":3,"name":"Gzip Command in Linux"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/b49855299264df5e27e3ec6c2cd9fde9","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team is a group of passionate educators and industry experts dedicated to providing high-quality online learning resources on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. With years of experience in the field, the team aims to simplify complex topics and help learners advance their careers. At DataFlair, we believe in empowering students and professionals with the knowledge and skills needed to thrive in today\u2019s fast-paced tech industry. Follow us for Free courses, expert insights, tutorials, and practical tips to boost your learning journey.","url":"https:\/\/data-flair.training\/blogs\/author\/datafbdad\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/110791","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=110791"}],"version-history":[{"count":3,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/110791\/revisions"}],"predecessor-version":[{"id":110834,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/110791\/revisions\/110834"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/110794"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=110791"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=110791"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=110791"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}