Can we verify a corrupted TAR?
Hello, I am an used-to-be Windows user shifting to Red Hat Linux environment. I have a question on TAR verification.
Here is the scenario: I am in the midst of testing whether I can get TAR to provide me with descriptive information of a corrupted TAR file. The verify(-W) attribute of TAR is not descriptive enough, it can only tell me, e.g.: [oraprod@oracle02 test]$ tar Wtvf output.tar >tar: 4 garbage bytes ignored at end of archive >tar: Error exit delayed from previous errors But what I would like to know is, for instance: [1] The content of the TAR, with identification of the corrupted files or [2] More detailed information, if some portion of the TAR has corrupted. Is that possible? Thx, Charisma |
Hi, Tsilok!
Yes, it's possible and pretty easy too. If you have an md5sum file that came with the archive you can type: Code:
md5sum -c (nameofmd5sumfile.md5) or Code:
cat (nameofmd5sumfile.md5) && md5sum (nameoftararchive.tar/.tar.gz/.tgz/.tar.bz2) Also, you can try: Code:
tar -ztvf (nameoftararchive.tar.gz) or Code:
tar -jtvf (nameoftararchive.tar.bz2) or Code:
tar -tvf (nameoftararchive.tar) That will list the files in the archive and give you an error message if it can't (pretend to) extract one or more of them. Hope that helps. --Dane |
Of course you could just do a cat of the tar (or better a more of the tar). The header information can be seen but you'll have to pick it out of the other garbage.
|
Perhaps you could also try "TARFIX" program
This package contains tools for processing and recovering damaged tar archive files |
Dear all,
Thanks for the assistance. I have figured it out. |
All times are GMT -5. The time now is 09:05 AM. |