I have a bunch of tarball backups which I just restored onto my new Windows 8.1 + Cygwin system using GNU tar:
zsh$ for file in **/*.tgz; do tar xvzf $file; done
To my surprise a lot of these extracted files were corrupt. I tried replacing GNU tar with BSD tar and repeated the process, but the same files were still corrupt.
Then I tried extracting them with WinRAR, and they turned up just fine. Does anybody know what's going on?
diff -u <(od -An -vtx1 < f1) <(od -An -vtx1 < f2)
where f1 and f2 are the same file but extracted with tar and winrar? – Stéphane Chazelas May 27 '14 at 06:28.otf
and.mp3
so I'm not sure what good a diff would do. What I said to @Mikel earlier about the text files was a false alarm. – Mark Boulder May 27 '14 at 06:54.tgz
created in the first place? – Anthon May 27 '14 at 07:05tar czf $file.tgz $folder
– Mark Boulder May 27 '14 at 07:10od
to see what bytes differ, but I forgot the-w1
option to add tood
. – Stéphane Chazelas May 27 '14 at 07:32diff -u <(od -An -vtx1 < garamond_premier_pro.otf) <(od -An -vtx1 < garamond_premier_pro_corrupt.otf)
– Mark Boulder May 27 '14 at 14:44cmp -l file1 file2
give anything? Or possibly cygwin reads the files in some way that eol characters are converted on the fly so it can't detect the difference. – Stéphane Chazelas May 27 '14 at 14:53cmp
returns nothing as well. In Windows the first file opens fine, the second one returns:The requested file is not a valid font file.
– Mark Boulder May 27 '14 at 14:56extracted_tar
andextracted_winrar
) with all their content? – Mark Boulder May 28 '14 at 02:08diff
, but the first option in this answer should be helpful. How exactly are you determining that these extractions are "corrupt"? – Warren Young Jul 22 '14 at 14:16