7

As follows from UNZIP(1L) man page

Archives read from standard input are not yet supported

Are there another CLI programs running under Linux/cygwin which can extract from zip archives reading them from stdin?

vect
  • 295

3 Answers3

7

Repost of my answer:

BusyBox's unzip can take stdin and extract all the files.

wget -qO- http://downloads.wordpress.org/plugin/akismet.2.5.3.zip | busybox unzip -

The dash after unzip is to use stdin as input.

You can even,

cat file.zip | busybox unzip -

But that's just redundant of unzip file.zip.

If your distro uses BusyBox by default (e.g. Alpine), just run unzip -.

BusyBox is available in Cygwin.

Saftever
  • 171
2

Thanks to Eir Nym comment I tried bsdtar from bsdtar package on Linux (Ubuntu) and it works.

0

(improved for Windows) IF you have Java JDK (big if!)

 get_zip_content | jar x
 # xv to list while extracting
 # optionally specify entries to extract; default is all
 # supply full /path_to_jdk/bin/jar if it's not in PATH

I rate this about 7/10 on the kludge scale.