2

I have a tar.gz archive that has been split apart like so -

files.tar.gz.part-aa.gz
...
...
...
files.tar.gz.part-ap.gz

I combine them using the cat command -

cat files* > files.tar.gz This combines the files into a 16 GB tar.gz file (which is expected)

If I try to run tar -zxf files.tar.gz I get the following error -

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: error is not recoverable: exiting now

If I check the status of the file, I get this output -

file files.tar.gz then the output I get is weird - it says - files.tar.gz: data

Any ideas?

EDIT -

I ran some of the commands that you guys were mentioning I should try. Here are the results -

Ran the following commands on several different file parts. As you will see, the output is different for some file parts.

Command Run: gunzip files.tar.gz.part-ap.gz
Output/Response: gzip: filestar.gz.part-ap.gz: not in gzip format

Command Run: file files.tar.gz.part-ap.gz
Output/Response: files.tar.gz.part-ap.gz: data

Command Run: gzip -d files.tar.gz.part-ap.gz
Output/Response: gzip: files.tar.gz.part-ap.gz: not in gzip format

Command Run: file files.tar.gz.part-ah.gz
Output/Response: files.tar.gz.part-ah.gz: 8086 relocatable (Microsoft)

Command Run: file files.tar.gz.part-ak.gz
Output/Response: files.tar.gz.part-ak.gz: data

Thanks.

  • 2
    The glob could theoratically match the output too and that could cause problems. Have you tried cat files.tar.gz.part-* > files.tar.gz ? – PSkocik Aug 23 '16 at 14:31
  • What does file files.tar.gz.part-aa.gz say? – Stephen Kitt Aug 23 '16 at 20:56
  • Did you create a tar file, compress it, split it, then compress the split files? That's my guess, based on files.tar.gz.part-aa.gz maybe gzip cowardly refused to compress the already compressed split files? – Jeff Schaller Aug 24 '16 at 2:38
  • Question has been updated with the output – user1210304 Aug 24 '16 at 15:32
2

Intepreting the file extensions, it looks like these are compressed portions of a compressed archive; try this:

 gunzip files.tar.gz.part-??.gz
 cat files.tar.gz.part-?? > files.tar.gz
 tar xf files.tar.gz
  • When I try to gunzip any of the files, I get the following error - gunzip files.* gzip: files.tar.gz.part-aa.gz: not in gzip format gzip: files.tar.gz.part-ab.gz: not in gzip format etc. – user1210304 Aug 23 '16 at 20:28
  • I updated the question with the outputs of what you suggested. – user1210304 Aug 24 '16 at 15:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.