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 |
Verify that the files are in fact GZip by using the file command.
Code:
file filename |
try:
tar xvzf $file_name |
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 |
okay, try to first just gunzip them:
gunzip $file and post back results |
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 |
what is the file. I'll d/l it and try to open it.
|
hi winzip open archive ?
try:unzip or gzip -d file.tar.gz | tar-xvf file.tar |
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. |