如何在Windows CMD中添加gzip命令? [英] How do I add a gzip command to Windows CMD?

查看:824
本文介绍了如何在Windows CMD中添加gzip命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Mac中,如果要gzip文件,则只需键入 gzip ,然后输入文件名。如果我在Windows中执行此操作,它会告诉我无法识别gzip ...。

In a Mac, if I want to gzip a file, I just type gzip and then the file name. If I do this in windows, it tells me that "gzip is not recognized...".

如何向Windows添加此功能?

How do I add this functionality to Windows?

推荐答案

如何向CMD添加 gzip



步骤1:下载并安装 Cygwin

步骤2:单击开始,然后键入系统环境变量

Step 2: Click 'Start' and type System Environment Variables

步骤3:在高级标签中,单击环境变量 ...'

Step 3: In the 'Advanced' tab, click 'Environment Variables...'

步骤4:在(用户)的用户变量部分中,选择路径变量,然后单击编辑...。

Step 4: In the 'User variables for (user)' section, select the Path variable and click 'Edit...'

第5步:在编辑环境变量窗口中,单击新建

Step 5: In the 'Edit environment variable' window, click 'New'

步骤6:


  • 对于 x86 ,键入: C:\cygwin\ \bin

  • 对于 x64 ,键入: C:\cygwin64\bin

  • For x86 type: C:\cygwin\bin
  • For x64 type: C:\cygwin64\bin

步骤7:重新启动CMD,键入 gzip ,然后大声喊哇!

Step 7: Restart CMD, type gzip, and shout, "Wooooo!"

已问过此问题此处,但是问题和接受的答案不是很简单。他们假定您知道什么是系统环境变量,如何编辑它们以及什么是Cygwin。我想为任何无法用当前信息弄清楚的人写清楚的说明。

This question has been asked here, but the question and accepted answer are not very straightforward. They assume you know what System Environment Variables are, how to edit them, and what Cygwin is. I wanted to write out clear instructions for anyone that could not figure it out with the current information.

这篇关于如何在Windows CMD中添加gzip命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆