Answer the question
In order to leave comments, you need to log in
How to convert from a ZIP archive using bsdtar in streaming mode (through a pipe) to a tarball file with output to stdout?
It is necessary to stream the contents of a remote ZIP archive, reading it on the other side as a pure tarball.
Today I learned that a ZIP archive can be unpacked to disk using bsdtar on the fly (via a pipe): cat file.zip | bsdtar -xvf- -C /path/to/target_dir
Instead of unpacking files, I would like to get a tar archive, in streaming mode, for further manipulations.
Answer the question
In order to leave comments, you need to log in
Through a lot of trial and error, as well as studying the bsdtar documentation (not GNU / tar, but the one that works with libarchive), I finally achieved my goal:
In general, scenarios can be as follows:
or like this:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question