Pages

Monday, 2 November 2015

How to solve: "not in gzip format"?

Problem: I tried to unzip a file MyFile.tar.gz which looked like a gzipped file by the name. But while unzipping I encountered an error “gzip stdin not in gzip format” which was as following:
$tar xvzf MyFile.tar.gz
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors
The error indicates that the file is not in Gzipped format. Then which format is it ? To find out, I ran file command on it:
file MyFile.tar.gz
MyFile.tar.gz: POSIX tar archive (GNU)
Reason: Reason for the error is quite evident. The file is not a gzipped file but a POSIX tar archive file. Which means it was not zipped at all but instead it was compressed using tar. It was simply renamed afterwards.
Solution: Since it was not a a gizzped file, a simple tar is able to extract the file:
tar xvf MyFile.tar.gz
I hope you found it helpful. 
from http://itsfoss.com/how-solve-stdin-gzip-format/