Treat .tar.gz extract as atomic operation?

1 2 3 4 > >> (Page 1 of 4)
  • Aren Cambre
    Aren Cambre

    7zip currently treats .tar and .gz extraction as separate operations. These should be combined by default; rarely do people _not_ go through both steps.

    In other words, if I extract a .tar.gz file, I should end up with the TAR's contents, not the TAR file.

    • No way.
      GNU gzip and tar both perform a single operation apiece.
      This is what sysadmins and users the world over are expecting, and learning new tricks is more painful than this enhancement.

      • Kevin Roberts
        Kevin Roberts

        If I understand your objection correctly, you might be missing the point. The suggestion is that 7-zip be enhanced with an optional switch, not that gzip and tar be changed. There would be no impact on established configurations of 7-ZIp or scripts using gzip or tar.

    • SeldomGood

      not completetley true: tar is able to use the exterjal gzip or bzip2 programs as filters to do al in one step.

      tar implements this as an option

      tar cf archive.tar  * 

      creates a tar archive

      tar czf archive.tar.gz *

      creates a tar archive and automatically gzips it

      tar cjf archive.tar.bz2 *

      creates a tar archive and automatically bzip2s it

      the same options (z and j) work for extraction.

      what would be wrong with something similar for 7zip?
      Apart for using up programmer's time of course.

    • Dženan Zukić
      Dženan Zukić

      Yes, this is definitely a good idea

    • Juanzo

      Maybe open a setting that some of us could enable to extract tar.gz to the contents of the tar file automatically?

    • Kevin Roberts
      Kevin Roberts

      Amen. I am trying to force myself to switch from WinZip, but this behaviour always stops me up short.

      If you use WinZip on a tar.gz file it displays a message saying the .gz file only contains one archive (the  .tar file), and would I like to extract it to a temporary folder and extract the contents.

      The WinZip approach is reasonable, but I would prefer to have the option of setting a switch that always decompresses .tar.gz files as an atomic operation.

      I'd like it to always ask do decompress the .tar file (like WinZip does) but with the added option of displaying a check box to make the behaviour the default.

    • Just to say that WinRar also consider by default tar.gz as a format and extract the content of the tar in one operation.

      For me too this is the main weakness of 7zip over WinRar and WinZip.


    • Murray Crowe
      Murray Crowe

      Add my vote. This is driving me nuts with a whole batch of tgz files

    • Just for the record, DJTAR from DJGPP (or DJTARNT associated with old Win32 Emacs releases) can unpack .tar.gz (or .tar.Z or "Deflate" .zip) all in one step without using other utils. DJGPP 2.04 beta's DJTAR can also handle .tar.bz2, but I'm fairly sure the pre-compiled Win32 builds (from 1999?) don't support this.

      Grab DJLSR204.ZIP from your nearest DJGPP mirror and compile it yourself (or just use the DOS binary from DJDEV204.ZIP if you have 32-bit Windows).

      P.S. By default it just lists the contents (same as "-t"), use "-x" to extract. See below for brief documentation:

    • Ben Collver
      Ben Collver

      7z x -so file.tar.gz | 7z l -si dummy

      Got error:
      Reading archives from stdin is not implemented

      • Igor Pavlov
        Igor Pavlov

        1) use 7-zip 9.04
        7z x -so file.tar.gz | 7z l -si  -ttar

        • Ben Collver
          Ben Collver

          That works for me with 9.04 on .tar.gz archives, but not for .cpio.gz archives.

          This succeeds::
          7z x foo.cpio.gz
          7z l foo.cpio

          This fails:
          7z x -so foo.cpio.gz | 7z l -si -tcpio

          7-Zip 9.04 beta  Copyright (c) 1999-2009 Igor Pavlov  2009-05-30

          7-Zip 9.04 beta  Copyright (c) 1999-2009 Igor Pavlov  2009-05-30

          Processing archive: foo.cpio.gz
          Extracting: foo.cpio
          Error: Not implemented
          Errors: 1
          ERROR: The pipe has been ended.

          • Igor Pavlov
            Igor Pavlov

            That feature (-si) is not implemnted for cpio still.
            I want to test the code for tar at first.

    • Steve Hall
      Steve Hall

      Another vote for getting this option added to the right-click context menu. (7-zip's only deficiency.)

    • Hades32

      +1, It simply makes no sense to open a archive only to have to open another archive...

    • jopojop

      +1 from me.
      Extracting tar.gz-files in two manual steps instead of one is for me the main inconvenience compared to WinRAR, which I used before I installed 7-zip recently.
      Currently I mostly use the file explorer right-click menu UI in Windows.

    • Andreas Fink
      Andreas Fink


  • Roger Pack
    Roger Pack

    +1 I really want this! .

  • Thomas Weber
    Thomas Weber

    +1 too. 7-Zip is really a great tool, but this is a feature it's missing. please add this, please

  • Tony O'Hagan
    Tony O'Hagan

    I strongly agree. 
    While I like 7-zip overall … I find this its most annoying missing feature.

  • MvG

    Another +1 here. It should be optional, of course, just a simple checkbox in the settings saying something like "Open .tar automatically when a .tar.gz archive only contains a single .tar".

  • chupakabra

    This feature is highly anticipated.

  • MvG

    By the way, in regard to #21: IMHO that checkbox could be checked by default (opt-out).

  • foxyshadis

    marcvangend, a gz/bz2/xz can only ever contain one file, so there's no need for that level of protection. If there's a tar inside, it should be opened by default. If you want to extract the tar itself, you should have to open the file with 7z -tgz (rather than 7z -ttgz or whatever), or use a context menu item like Open Container. The same would apply to .exe archives, especially since I like opening .exe resources directly.

1 2 3 4 > >> (Page 1 of 4)