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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-11-2007, 11:39 PM
|
#1
|
Member
Registered: Jan 2005
Location: Québec
Distribution: Mandrake 10.1 Official
Posts: 104
Rep:
|
"gzip: stdin: unexpected end of file" when untaring
well that's pretty much it. whenever i try to tar -xvzf blablabla.tar.gz, it says :
gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error exit delayed from previous errors
and it's not for just one broken file. i tried every .tar.gz files i have, it says the same damned thing.
what is it?
i'm using ubuntu feisty, latest version. i updated everything minutes ago.
thanks!
|
|
|
11-11-2007, 11:53 PM
|
#2
|
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530
Rep:
|
What happens if you just gunzip the file?
|
|
|
11-11-2007, 11:54 PM
|
#3
|
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530
Rep:
|
Also, check if tar is aliased:
|
|
|
11-12-2007, 12:02 AM
|
#4
|
Member
Registered: Jan 2005
Location: Québec
Distribution: Mandrake 10.1 Official
Posts: 104
Original Poster
Rep:
|
when i do "type tar", it says :
tar is hashed (/bin/tar)
and while using gunzip, it says :
gunzip: nameoffile.tar.gz: unexpected end of file
|
|
|
11-12-2007, 01:46 AM
|
#5
|
Member
Registered: Feb 2006
Distribution: Fedora
Posts: 341
Rep:
|
I've usually only seen that when my downloads are cut off mid way. Can you try zipping up a local file and then running your command on it again?
Code:
echo "hallo" > tempfile
tar cvf tempfile.tar tempfile
gzip tempfile.tar
tar zxvf tempfile.tar.gz
If that works fine, then there's probably a problem with the packages you downloaded. You could try comparing the filesize in your hard disk with the one in the website to confirm.
|
|
|
11-12-2007, 07:35 AM
|
#6
|
Member
Registered: Jan 2005
Location: Québec
Distribution: Mandrake 10.1 Official
Posts: 104
Original Poster
Rep:
|
oyoyoy, i tried but it does not work.
and it does the same for every tar on my computer. the ones that used to work, that i've downloaded and used many times before, do not work now.
i'm at lost. any way to like reinstall gzip or something?
|
|
|
11-12-2007, 08:10 AM
|
#7
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
Are these files larger than 2gb? What file system are they on?
Did you try "tar czf test.tar.gz <a couple> <small files>" in your home directory just to test the tar command? One thing I am wondering is if you crossed the filesize limit on a VFAT drive or samba share, truncating the file. Another thing to look at is if there is a problem with the filesystem on the storage device. Or if you saved a link to the archive instead of the archive itself.
What does "file archivename" tell you?
Could you try using gzip, gunzip (or zcat) on there own in a test. Since running gunzip failed, it sounds like the gunzip part failed rather than the tar part. What is the version of gzip that you have now? "gzip --version".
|
|
|
11-12-2007, 08:28 AM
|
#8
|
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530
Rep:
|
What about a .bz2 file - can you bunzip2 one of these without an error?
|
|
|
11-12-2007, 08:05 PM
|
#9
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,415
|
iirc, I've seen this occasionally before, where there's been an error in the file creation/naming and in fact the file isn't gzipped, in spite of the filename implication. Ditto 'not actually tar file'.
Try just doing the gunzip first (gunzip file.tar.gz) and see what happens.
|
|
|
All times are GMT -5. The time now is 08:42 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|