Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 460
Valentin Macé Avatar asked Mar 05 '23 14:03

Valentin Macé


2 Answers

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 :)

like image 130
Valentin Macé Avatar answered Mar 29 '23 06:03

Valentin Macé


I have been using MobaXterm software in my local machine (Windows).
It works like Putty and WinSCP together and opens the local desktop in linux mode, thus it is easy for me to gunzip the *.gz type files.

like image 28
Prashant Bhardwaj Avatar answered Mar 29 '23 07:03

Prashant Bhardwaj