【发布时间】:2015-07-12 17:24:30
【问题描述】:
在 Windows 机器上出现此错误
'touch' 不是内部或外部命令、可运行程序或批处理文件。
我正在关注这些 instructions,它们似乎是特定于 linux 的,但在标准的 windows 命令行上它不能像这样工作:
touch index.html app.js style.css
是否有与 linux / mac os / unix world 中的“touch”命令等效的 windows ?为了实现这种命令,我是否需要手动创建这些文件(并修改它们以更改时间戳)?我正在使用 node,这似乎不是很... node-ish...
【问题讨论】:
-
simple Google search 向您展示了
touch的许多 Windows 实现。此处的其他讨论:superuser.com/questions/10426/… 和 Cygwin library 是 Windows 上 Unix 命令的常用工具集。 -
如果您在使用 PowerShell 时登陆过这里,请直接跳转到 Raghuveer's answer。
标签: windows batch-file cmd command-line