I want to extract an archive named filename.tar.gz
.
Using tar -xzvf filename.tar.gz
doesn't extract the file. it is gives this error:
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors
I want to extract an archive named filename.tar.gz
.
Using tar -xzvf filename.tar.gz
doesn't extract the file. it is gives this error:
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors
I have the same error the result of command :
is
hadoop-2.7.2.tar.gz: HTML document, ASCII text
the reason that the file is not gzip format due to problem in download or other.
It happens sometimes for the files downloaded with "wget" command. Just 10 minutes ago, I was trying to install something to server from the command screen and the same thing happened. As a solution, I just downloaded the .tar.gz file to my machine from the web then uploaded it to the server via FTP. After that, the "tar" command worked as it was expected.
A tar.gz is a tar file inside a gzip file, so 1st you must unzip the gzip file with
gunzip -d filename.tar.gz
, and then usetar
to untar it. However, sincegunzip
says it isn't in gzip format, you can see what format it is in withfile filename.tar.gz
, and use the appropriate program to open it.If
file filename.tar.gz
gives this message: POSIX tar archive, the archive is a tar, not a GZip archive.Unpack a tar without the
z
, it is for gzipped (compressed), only:Or try a generic Unpacker like
unp
(https://packages.qa.debian.org/u/unp.html), a script for unpacking a wide variety of archive formats.determine the file type:
Internally
tar xcvf <filename>
will call the binarygzip
from thePATH
environment variable to decompress the files in thetar
archive. Sometimes third party tools use a customgzip
binary which is not compatible with thetar
binary. It is a good idea to check thegzip
binary in yourPATH
withwhich gzip
and make sure that a correctgzip
binary is called.As far as I can tell, the command is correct, ASSUMING your input file is a valid gzipped tar file. Your output says that it isn't. If you downloaded the file from the internet, you probably didn't get the entire file, try again.
Without more knowledge of the source of your file, nobody here is going to be able to give you a concrete solution, just educated guesses.