{"id":880,"date":"2015-10-14T07:13:02","date_gmt":"2015-10-14T07:13:02","guid":{"rendered":"http:\/\/shivdev.com\/blog\/?p=880"},"modified":"2015-10-14T07:13:02","modified_gmt":"2015-10-14T07:13:02","slug":"recover-a-corrupted-gz","status":"publish","type":"post","link":"http:\/\/shivdev.com\/blog\/2015\/10\/14\/recover-a-corrupted-gz\/","title":{"rendered":"Recover a corrupted gz"},"content":{"rendered":"<p>Sometimes you might be able to salvage a corrupted gzip. Typically this trick always works on most log files. <\/p>\n<blockquote><p>$ gunzip corrupted.gz<br \/>\ngunzip: corrupted.gz: unexpected end of file<br \/>\ngunzip: corrupted.gz: uncompress failed\n<\/p><\/blockquote>\n<p>Use the <strong>-c<\/strong> option that outputs to console, but redirect to a new salvaged file. Then gzip the salvaged file to recover it.<\/p>\n<blockquote><p>$ gunzip -c corrupted.gz > salvaged<br \/>\n$ gzip salvaged<\/p><\/blockquote>\n<p>You can now delete the corrupted gz file and use the salvaged version.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes you might be able to salvage a corrupted gzip. Typically this trick always works on most log files. $ gunzip corrupted.gz gunzip: corrupted.gz: unexpected end of file gunzip: corrupted.gz: uncompress failed Use the -c option that outputs to console, but redirect to a new salvaged file. Then gzip the salvaged file to recover it. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[13,12],"tags":[],"_links":{"self":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts\/880"}],"collection":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/comments?post=880"}],"version-history":[{"count":1,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts\/880\/revisions"}],"predecessor-version":[{"id":881,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts\/880\/revisions\/881"}],"wp:attachment":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/media?parent=880"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/categories?post=880"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/tags?post=880"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}