添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I am trying to use a "gunzip" command on windows as part of a build process that is rigid and cannot change. Basically in order to compile the FIPS canister for OpenSSL, you have to follow a few commands, and you cannot deviate from them.

This means I have to unzip the source tarball using gunzip as per the documentation ( https://www.openssl.org/docs/fips/SecurityPolicy-2.0.12.pdf , Appendix A).

So far I have found GZip for windows ( http://gnuwin32.sourceforge.net/packages/gzip.htm ), however I cannot understand how this makes the gunzip command available. I can see a "gunzip" file, and how that works with the only executable in the installer, but I cannot see how you can run the command "gunzip".

Am I missing something obvious here?

Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See What topics can I ask about here in the Help Center. Perhaps Super User or Unix & Linux Stack Exchange would be a better place to ask. Also see Where do I post questions about Dev Ops? . jww Apr 19, 2016 at 18:33

To keep compression and decompression logic together, there is one program and command gunzip actually runs gzip program with option -d . On Unix a script using !# syntax does this invisibly.

To do the same on Windows, assuming you put gzip.exe in a directory in your PATH, in the same place (or another PATH dir) create a file gunzip.bat containing gzip -d %* . Or to make the output look nicer, @echo off then gzip -d %* .

gunzip -c file | tar x... should then work as desired (assuming you also have tar ).

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question . Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers .