I have a tar file with tar files in it. They are rather large so I was wondering if it is possible to extract a specific tar in the tar file directly.

Is that possible? How?


If I understood it correctly that you want the contents of the "inner" tar file to be extracted, 1) use the O option to extract a given file to stdout, 2) use f - to read an archive from stdin:

tar -xOf outer_archive.tar inner_archive_1.tar | tar -tf -

tar -xOf outer_archive.tar inner_archive_1.tar | tar -xvf -

If you have 7-Zip installed, either on Linux (or from from GNOME Software, for Debian distros) or on Windows in a dual-boot setup (7-Zip runs well under wine), you can explore a tar or other archive using a GUI, and decide what needs to be extracted.

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.