{"id":30624,"date":"2018-03-04T11:17:35","date_gmt":"2018-03-04T05:47:35","guid":{"rendered":"https:\/\/www.wikitechy.com\/technology\/?p=30624"},"modified":"2018-03-04T11:17:35","modified_gmt":"2018-03-04T05:47:35","slug":"extract-tar-gz-files-using-linux","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/technology\/extract-tar-gz-files-using-linux\/","title":{"rendered":"How To Extract tar.gz Files Using Linux"},"content":{"rendered":"<h4 id=\"introduction\"><strong>Introduction<\/strong><\/h4>\n<p>This guide will display you now not simplest the way to extract tar.Gz documents but it&#8217;ll also tell you what they&#8217;re and why you will use them.<\/p>\n<h4 id=\"whats-a-tar-gz-record\"><strong>What&#8217;s a tar.gz record?<\/strong><\/h4>\n<p>A record with the extension gz has been compressed the use of the gzip command.<\/p>\n<p>You could zip up any file the use of the gzip command as follows:<\/p>\n<pre>Gzip<\/pre>\n<p>For instance:<\/p>\n<pre>Gzip image1.Png<\/pre>\n<p>The above command will compress the record image1.Png and the file will now be called image1.Png.Gz.<\/p>\n<p>You can uncompress a report which has been compressed with gzip by the usage of the gunzip command as follows:<\/p>\n<pre>Gunzip image1.Png.Gz\r\nBelieve now which you wanted to compress all the photos in a folder. You can use the subsequent command:<\/pre>\n<pre>Gzip *.Png *.Jpg *.Bmp<\/pre>\n<p>This will compress every file with the extension png, jpg or bmp. All of the documents, but, would remain as individual documents.<\/p>\n<p>It might be proper if you could create a single document containing all of the documents and then compress that the usage of gzip.<\/p>\n<p>This is wherein the tar command is available in. A tar file that&#8217;s frequently known as a tarball is a method of creating an archive file which incorporates many other documents.<\/p>\n<p>A tar document on its own isn&#8217;t compressed.<\/p>\n<p>If you have a folder complete of photographs you may create a tar report for the snap shots the use of the subsequent command:<\/p>\n<pre>tar -cvf snap shots.Tar ~\/photographs<\/pre>\n<p>The above command creates a tar document referred to as pictures.Tar and populates it with all the documents within the photographs folder.<\/p>\n<p>Now which you have a single record with all your photographs you can now compress it the use of the gzip command:<\/p>\n<pre>Gzip pix.Tar<\/pre>\n<p>The filename for the pics report will now be images.Tar.Gz.<\/p>\n<p>You can create a tar document and compress it the use of a unmarried command as follows:<\/p>\n<pre>Tar -cvzf snap shots.Tar.Gz ~\/photographs<\/pre>\n<h4 id=\"how-to-extract-tar-gz-files\"><strong>How to extract tar.Gz files<\/strong><\/h4>\n<p>Now you realize a tar.Gz record is a compressed tar document and that you understand a tar report is a pleasant way of grouping files and folders.<\/p>\n<p>The primary component to do then to extract a tar.Gz record is to decompress the report as follows:<\/p>\n<pre>Gunzip<\/pre>\n<p>As an instance:<\/p>\n<pre>Gunzip photographs.Tar.Gz<\/pre>\n<p>To extract the documents from a tar record use the following command:<\/p>\n<pre>Tar -xvf<\/pre>\n<p>As an example:<\/p>\n<p>Tar -xvf photos.Tar<br \/>\nYou could, however, decompress the gzip report and extract the files from the tar report using a single command as follows:<\/p>\n<pre>Tar -xvzf images.Tar.Gz<\/pre>\n<h4 id=\"list-the-contents-of-a-tar-gz-file\"><strong>List the contents of a tar.Gz file<\/strong><\/h4>\n<p>You need to be careful approximately extracting tar.Gz documents that you acquire from other humans or from download hyperlinks as they may either intentionally or inadvertently break your gadget.<\/p>\n<p>You may view the contents of a tar file using the subsequent syntax:<\/p>\n<pre>Tar -tzf snap shots.Tar.Gz<\/pre>\n<p>The above command will show you the names and locations of the documents with a purpose to be extracted.<\/p>\n<p><strong>Summary<\/strong><\/p>\n<p>Tar.Gz files are top notch for backup purposes as they preserve the files and paths intact in the tar record and the report is compressed to make it smaller.<\/p>\n<p>Any other manual you is probably inquisitive about is this one that suggests a way to compress documents the use of the linux zip command and this one suggests the way to decompress the documents the use of the unzip command.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This guide will display you now not simplest the way to extract tar.Gz documents but it&#8217;ll also tell you what they&#8217;re and why you will use them.<\/p>\n","protected":false},"author":2,"featured_media":30628,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1699],"tags":[84690,84685,84691,84686,84692,84687,84689,84688],"class_list":["post-30624","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-create-tar-gz-file-linux","tag-extract-tar-gz-windows","tag-gzip-stdin-not-in-gzip-format","tag-how-to-extract-tar-gz-file-in-windows-command-line","tag-tar-extract-to-directory","tag-tar-gz-file-linux","tag-tar-unzip-zip","tag-unzip-tar-gz-mac"],"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/30624","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/comments?post=30624"}],"version-history":[{"count":0,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/30624\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/media\/30628"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/media?parent=30624"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/categories?post=30624"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/tags?post=30624"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}