# The Answer Gang 65: Corrupt Tar Archive

# The Answer Gang

#### By Jim Dennis, Ben Okopnik, Dan Wilder, Breen, Chris, and the Gang, the Editors of Linux Gazette... and You!
Send questions (or interesting answers) to linux-questions-only@ssc.com

There is no guarantee that your questions here will ever be answered. You can be published anonymously - just let us know!

### Corrupt Tar Archive

From Mohamed Ezz

Answered By Ben Okopnik

I have 'ftp'ed an 8MB tar archive file and cannot untar it. I did not do a checksum after the ftp because I know ftp should do this on its own. When I run: $ tar xvf myfile.tar I get:

    tar: This does not look like a tar archive
    tar: Skipping to next header
    tar: 447 garbage bytes ignored at end of archive
    tar: Error exit delayed from previous errors

My problem is I lost the files of which the archive is composed of, so I can't regenerate it. To make things worse, the archive file on the source machine (from where I did the ftp) was deleted. So the local archive is my only hope of retrieving my files.

Any help is greatly appreciated.

Ezz

> [Ben] There might actually be some hope here! If an archive is tarred and gzipped, the above is exactly the error that will be returned when you try to untar it without un-gzipping. Try this:

> > `tar xvzf myfile.tar`

> Note that the file really should have been called "myfile.tgz", if that's what it turns out to be.

Hello Ben, That was it! Thank you so much. Excuse my ignorance about the extension. Ezz

> [Ben] No worries at all, Mohamed; glad I could help.

> [Mike] Actually, it makes us happy to learn a problem has been fixed. Thanks for letting us know.

##### This page edited and maintained by the Editors of Linux Gazette Copyright © 2001
Published in issue 65 of Linux Gazette April 2001

###### HTML script maintained by Heather Stern of Starshine Technical Services, http://www.starshine.org/

| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |