I have several files as follow :


I tried the following command :

tar -zxvf multiview_action.tgz*

I got the following error :

gzip: stdin: unexpected end of file
tar: Fin prématurée rencontrée dans l'archive.
tar: Error is not recoverable: exiting now

You should concatenate (cat) the split tar-gz files, decompress them (gunzip) and extract the tar archive (tar -x).

You can extract split .gz archives directly using the zcat command which concatenates and directly uncompresses the files. Then pipe the result to the tar extract command, creating no intermediate files:

zcat multiview_action.tgz.part-* | tar -x

Another option (with a different grouping of the 3 mentioned commands) is to use cat piped to tar with the z option:

cat multiview_action.tgz.part-* | tar -xz
| improve this answer | |

Files are divided with split, to join the file you need to use cat before you can extract your .tgz file:

cat multiview_action.tgz.part-* > multiview_action.tgz

If you leave out -z from options tar will guess archive type by the file .ext:

tar -xf multiview_action.tgz
| improve this answer | |
  • Creating a temporary file is not necessary and might be unfeasible if the archive is too big. See my answer for solutions without temporary files. – Melebius Jul 1 at 6:31
  • true if you don't intend to save the original archive. – bac0n Jul 1 at 12:21

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