windowsterminalcommandgzipgunzip

Using gunzip on Windows in command line


I need to use gunzip (which is the decompression tool of gzip) in a terminal on Windows

I've downloaded gzip from here (first download link)

I installed it and added its /bin folder to my PATH variable, the gzip command works but gunzip is not even executable so I can't use it

gunzip content:

#!/bin/sh
PATH=${GZIP_BINDIR-'c:/progra~1/Gzip/bin'}:$PATH
exec gzip -d "$@"

Thanks


Solution

  • I made it work

    As I said I needed to install gzip and add its /bin folder to my PATH variable

    Then edit the ProgramFiles/GnuWin32/bin/gunzip file using this (replace everything):

    @echo off
    gzip -d %1
    

    and save it to .bat format so you now have a gunzip.bat file in your /bin folder

    Now I can use gunzip in a terminal :)