LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Why can't I unzip a .tar.gz file (https://www.linuxquestions.org/questions/linux-software-2/why-cant-i-unzip-a-tar-gz-file-93963/)

Dewar 09-17-2003 06:58 PM

Why can't I unzip a .tar.gz file
 
I have downloaded several .tar.gz files containing source code for various packages. When I try to unzip them (using zcat <filename>, tar -zxvf <filename>, or gunzip <filename>) I ger the following error: invalid compressed data--format violated.

I doubt that every file I've downloaded is corrupt, so what simple stupid mistake am I making to cause this error to keep coming up?

-Dewar

Mathieu 09-17-2003 07:08 PM

Verify that the files are in fact GZip by using the file command.
Code:

file filename

BigNate 09-17-2003 07:49 PM

try:

tar xvzf $file_name

Dewar 09-18-2003 10:07 AM

The file command gives me the following info:

gzip compressed data, deflated, last modified.... max compression, os: Unix

the tar command without the dash gives me the same output as the command with the dash.

For a little background, I'm using SuSE professional 8.0 with a 2.4.18 kernel.

Thanks for the help,
-Dewar

andrewlkho 09-18-2003 10:30 AM

okay, try to first just gunzip them:
gunzip $file
and post back results

Dewar 09-18-2003 11:15 AM

Gunzip was included in the list of command's I'd tried in the first post. gunzip, tar, and zcat all give me the same error. Strangely, winzip in windows NT lets me open it up fine.

-Dewar

BigNate 09-18-2003 01:50 PM

what is the file. I'll d/l it and try to open it.

Xterminator 09-18-2003 02:01 PM

hi winzip open archive ?
try:unzip
or
gzip -d file.tar.gz | tar-xvf file.tar

Dewar 09-18-2003 04:07 PM

Thanks for the help everyone, but I was overcomplicating things. When I was transfering the file from the windows machine where it resides, not transfering in binary cause some data errors. Once I figured that out, and re-transfered the file, all was well.

-Dewar


All times are GMT -5. The time now is 02:04 PM.