Failed to extract a .tar.gz using pipeline

2013-05-15
2013-05-28
  • Lucas Malor

    Lucas Malor - 2013-05-15

    I tried to do

    7za -so e archive.tar.gz | 7za -si e
    

    Message:

    Processing archive: 
     (locale=en_US.UTF-8,Utf16=onError: E_NOTIMPL                
    ,HugeFiles=on,1
     CPU)
    Processing archive: archive.tar.gz
    Extracting  archive.tar
    

    Result: no file is extracted on the disk.

    I'm using p7zip 9.20.1 on Ubuntu 12.04.

     
  • Igor Pavlov

    Igor Pavlov - 2013-05-15

    7za -so e archive.tar.gz | 7za -si x -an -ttar -oFolder -y

     
  • Lucas Malor

    Lucas Malor - 2013-05-15

    It works! Some questions:

    1. what is the -an switch? It's not present in man docs, and I don't find it googling.
    2. it's not simpler to have a -fullpath switch for the "e" action, by default true for tar and false for the other archive types?

    Thank you for the help, and congrats for your work.

     
  • Lucas Malor

    Lucas Malor - 2013-05-15

    Ah, I would add that it could be nice to have the possibility to write option values separated by spaces, for example "-o FOLDER". This is because on unix shell as bash you have the possibility to autocomplete paths pressing tab (it seems to me that you can do it also with the windows cmd if you enable it). Anyway if you don't separate the path from the option, it can't be autocompleted.

     
  • Igor Pavlov

    Igor Pavlov - 2013-05-15

    1. Actually it can work without -an too. And there is "DOCS" folder with HTML help.
    2. "e" and "-o" are 10-years things. So I don't think that it's good idea to change something with such things.

     
  • Lucas Malor

    Lucas Malor - 2013-05-15

    Ok I found it. Maybe archive parameter will be not processed automatically if you use pipelines or -ai, I don't know.

    Another thing: can you or p7zip devs add a shortcut for that syntax? Something like

    7za -ttgz e archive.tar.gz
    

    or simply -ttarx, meaning the archive is an archive of type x that contains a tar? It's a bit difficult because you must separate options that should be applied at the left to the pipe and at the right of the pipe, but this way untarring an archive will be as simple as using

    tar -vxzf archive.tar.gz

    PS: I hope you'll change your mind about the syntax! :) This way you can't add any other option that start with "o", "-oo" for example, since you can't know if you intend "-oo" or "-o o" without the space. You can always maintain the old syntax, deprecating or undocumenting it.

    'Bye!

     

Log in to post a comment.