As the title says - anyone know of a method to add tar/gzip to the command line in Windows? I've installed Cygwin - but don't know if I have to add something to the PATH env variable to get tar as a cmd option
Install UnxUtils - it's a set of GNU utilities ported to Windows, sort of like Cygwin but they also work outside the Cygwin environment.
The method I've used to solve this is to install Cygwin then place the path to the bin directory in the PATH variable.
9 years later (2019), a more modern option is to uncompress the latest Git for Windows (like PortableGit-2.17.0-64-bit.7z.exe
).
It comes with 250+ linux command compiled for Windows, including tar and gzip.
No Cygwin needed.
But an even more recent option is the Command Line in Windows 10 version 1803: it includes a native tar
and curl
, right from your regular CMD
.
(not gzip
though). See announcement.
C:\Users\vonc>C:\Windows\System32\tar.exe --version
bsdtar 3.3.2 - libarchive 3.3.2 zlib/1.2.5.f-ipp
Nothing to install!
来源:https://stackoverflow.com/questions/1551338/add-tar-gzip-to-windows-command-line