windows vista - Extract a section of a tgz file

25
2013-09
  • TRiG

    I have a 28.5 GB .tgz file which was created on the command line of a Linux computer, compressing one folder and all its many many subfolders. I now want to extract a single sub-sub folder from that .tgz file, using 7zip on Windows Vista. I can't see a way to do it.

    Opening the .tgz file in 7zip just shows the .tar file inside it. There doesn't seem to be any way to browse that .tar file and extract the section I want. I assume there is a way to do this, but I can't see it.

    Simply double-clicking on the .tar file brings up a progress bar which runs slowly till my computer complains it's running out of space; I imagine it's trying to extract the whole thing.

    Searching for "extract section of tgz" and "extract tgz subfolder" and similar found me a way to do it on the Linux command line, but no obvious way to do it on Windows. (Most results found were about extracting into a subfolder, not extracting a subfolder out of the archive.)

  • Answers
  • Bolli

    WinRAR handles those archives just fine. Have you tried that?


  • Related Question

    archiving - programmatically extract tar.gz in a single step (on windows with 7zip)
  • dreftymac

    PROBLEM: I would like to be able to extract tar.gz files in a single step. This makes my question almost identical to this one: stackoverflow question for tar-gz.

    My question is almost the same, but not the same, because I would like to do this on windows using 7zip command-line (or something similar) inside a bat file or ruby/perl/python script.

    QUESTION: This seemingly simple task is proving to be more involved than the first appearance would make it out to be. Does anyone have a script that does this already?


  • Related Answers
  • shufler

    Perhaps the GnuWin32 ports of gzip and tar are what you need (scroll down)

  • MiffTheFox

    Maybe try something like adding a temporary .tgz extension?

    MOVE %1 %1.tgz
    7z x %1.tgz
    MOVE %1.tgz %1
    

    I might be wrong, but I believe 7zip will unzip tgz files all at once (instead of with tar.gz files).

  • Area 51

    Try the tartool utility http://tartool.codeplex.com/

    I was frustrated by the lack of a cmd line utility for such a simple task and created it for this exact reason.

    The code is open source and uses SharpZipLib library.