How to extract filename.tar.gz file

I want to extract the file named filename.tar.gz .

Using tar -xzvf filename.tar.gz does not extract the file. he gives this error:

 gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error exit delayed from previous errors 
+84
linux file gzip tar
Apr 01 '13 at
source share
6 answers

If file filename.tar.gz displays this message: POSIX tar archive, the archive is tar, not the GZip archive.

Unzip tar without z , it is only for gzipped (compressed):

 mv filename.tar.gz filename.tar # optional tar xvf filename.tar 

Or try the generic Unpacker, like unp ( https://packages.qa.debian.org/u/unp.html ), a script to unpack a wide variety of archive formats.

determine file type:

 $ file ~/Downloads/filename.tbz2 /User/Name/Downloads/filename.tbz2: bzip2 compressed data, block size = 400k 
+128
Apr 01 '13 at 13:13
source share

As far as I can tell, the command is correct, the ASSOCIATION of your input file is a valid gzipped tar file. Your result says that it is not. If you downloaded the file from the Internet, you probably didn’t receive the whole file, try again.

Without knowing the source of your file, no one here can give you a specific solution, just educated guesses.

+10
Apr 01 '13 at
source share

This sometimes happens for files downloaded using the "wget" command. Just 10 minutes ago, I tried to install something on the server from the command screen, and it happened. As a solution, I simply downloaded the .tar.gz file to my computer from the Internet, and then uploaded it to the server via FTP. After that, the tar command worked as expected.

+3
Apr 13 '15 at 11:38
source share

Internally, tar xcvf <filename> will call binary gzip from the PATH environment variable to unpack the files in the tar archive. Sometimes third-party tools use their own gzip binary, which is not compatible with the tar binary. It is recommended that you check the gzip binary in PATH with which gzip and make sure that the correct gzip binary is called.

+1
Sep 30 '16 at 12:07 on
source share

Make sure the file is complete. This error message may occur if you only partially downloaded the file or had serious problems. Check out MD5sum.

0
Dec 19 '14 at 17:20
source share

tar.gz is the tar file inside the gzip file, so you have to unzip the gzip file with gunzip -d filename.tar.gz and then use tar to unlock it. However, since gunzip says that it is not in gzip format, you can see in what format it is with file filename.tar.gz and use the appropriate program to open it.

-one
Apr 01 '13 at 13:20
source share



All Articles