LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-09-2007, 09:24 AM   #1
spangler
Member
 
Registered: Apr 2007
Posts: 45
Blog Entries: 1

Rep: Reputation: 15
gunzip error


I continue to get this error while trying to unzip a file:


gunzip: blacklists.tar.gz: not in gzip format

Could anyone tell me what other method I should use to unzip this file.

Thank you
 
Old 10-09-2007, 09:40 AM   #2
dafunks
Member
 
Registered: Sep 2007
Location: UK
Distribution: Slackware 12
Posts: 62

Rep: Reputation: 15
Try:

tar xvf blacklists.tar.gz
 
Old 10-09-2007, 04:12 PM   #3
student04
Member
 
Registered: Jan 2004
Location: Georgia
Distribution: OS X, CentOS
Posts: 669

Rep: Reputation: 34
Quote:
Originally Posted by dafunks View Post
Try:

tar xvf blacklists.tar.gz
That will work for files ending in .tar; you are missing the 'z' flag:

Code:
tar xvzf blacklists.tar.gz
will decompress it and extract the contents from the tarball.

To just decompress it, do:
Code:
gunzip blacklists.tar.gz
which will produce blacklists.tar

And just in case you're curious, to recompress the tarball:
Code:
gzip blacklists.tar
Flags of tar:
  • x - extract
  • z - use gunzip compression (*.gz or *.Z)
  • j - use bzip compression (*.bz2)
  • f - next argument is the file to process
  • v - verbose output

If you use gunzip to try and decompress the .tar.gz file and it complains that it is not in gzip format, then maybe the file is not a gz file even though it has that extension.

Try
Code:
file blacklists.tar.gz
See if that tells you if it is a gzipped file.

Last edited by student04; 10-09-2007 at 04:14 PM.
 
Old 10-09-2007, 06:00 PM   #4
dafunks
Member
 
Registered: Sep 2007
Location: UK
Distribution: Slackware 12
Posts: 62

Rep: Reputation: 15
tar xvf does the job fine

Screenshot, or it never happened? lol
http://dark-irc.net/dafz/tarxvf.png

Last edited by dafunks; 10-09-2007 at 06:05 PM.
 
Old 10-09-2007, 11:41 PM   #5
student04
Member
 
Registered: Jan 2004
Location: Georgia
Distribution: OS X, CentOS
Posts: 669

Rep: Reputation: 34
Ok so I was wrong about omitting the 'z' flag...


Maybe the file is corrupted?
 
Old 10-10-2007, 01:41 AM   #6
dafunks
Member
 
Registered: Sep 2007
Location: UK
Distribution: Slackware 12
Posts: 62

Rep: Reputation: 15
He might not have been typing the proper gunzip syntax. He only showed the output, not the input. So it is really hard to tell where he was going wrong, but yeah, every chance there was something wrong with the zipped file.
 
Old 10-10-2007, 07:29 AM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,396

Rep: Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395
Woudln't be the first time i've seen a file called file.tar.gz (or file.tgz) and it turned out not to be gzipped....
 
Old 10-11-2007, 08:06 AM   #8
spangler
Member
 
Registered: Apr 2007
Posts: 45
Blog Entries: 1

Original Poster
Rep: Reputation: 15
gunzip error

I tried the tar -xvf. That did not work. I got the error
blacklists/
blacklists/CATEGORIES
blacklists/ads/
blacklists/ads/domains

gzip: stdin: unexpected end of file
blacklists/ads/urls
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
tar: blacklists.tar: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
ERROR: unable to extract new lists,
aborting blacklist refresh.

I will now try the tar -zxvf and see if that works.

This is what the command is as it sits now:
# Untaring Blacklist archive.
tar -zxvf blacklists.tar.gz
# gunzip blacklists.tar.gz
tar -xf blacklists.tar
The commented out gunzip was the original command.

Thank you all for your help.
 
Old 10-11-2007, 09:34 AM   #9
dafunks
Member
 
Registered: Sep 2007
Location: UK
Distribution: Slackware 12
Posts: 62

Rep: Reputation: 15
Weird, did it extract everything in "blacklists/ads/urls"?

Oh well, you got what you needed, thats what counts
 
Old 10-15-2007, 12:31 PM   #10
spangler
Member
 
Registered: Apr 2007
Posts: 45
Blog Entries: 1

Original Poster
Rep: Reputation: 15
gunzip error

Using the tar -zxvf worked. It is now unzipping the file.

Thank you all for your help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
using gunzip ekdya Debian 2 04-11-2006 08:05 AM
gunzip error: no space on device numerion Linux - Enterprise 4 03-03-2006 07:34 AM
gunzip error: no space on device numerion LinuxQuestions.org Member Intro 3 02-13-2006 05:26 PM
Help using gunzip. troycus Linux - Newbie 2 09-22-2003 08:32 PM
gunzip gives unexpected error (RH8.0) robw Linux - Software 2 09-08-2003 05:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration