Zip file and print to stdout

后端 未结 1 1661
不思量自难忘°
不思量自难忘° 2021-02-20 05:46

I need archive file with zip and print zip-data to stdout in realtime. Standard zip program may create zip file only. This can do gzip with -c attribute, but it use gzip algorit

相关标签:
1条回答
  • 2021-02-20 06:38

    The zip program from Info-ZIP (the one usually found on Linux systems) allows generating ZIP files into the standard output, when you use - as the name of the file. For example you could send a zip file to port 8787 on a remote host with this command:

    zip -r - files_to_be_archived | nc remotehost 8787
    

    All of this is documented on the zip command manual page.

    0 讨论(0)
提交回复
热议问题