加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

cmd – Windows相当于“touch”(即node.js创建index.html的方法)

发布时间:2020-12-13 21:02:20 所属栏目:Windows 来源:网络整理
导读:在Windows机器上,我得到这个错误 'touch' is not recognized as an internal or external command,operable program or batch file. 当我按照instructions做: touch index.html app.js style.css 是否有相当于使用“触摸”的窗口?我需要手动创建这些文件(
在Windows机器上,我得到这个错误
'touch' is not recognized as an internal or external command,operable program or batch file.

当我按照instructions做:

touch index.html app.js style.css

是否有相当于使用“触摸”的窗口?我需要手动创建这些文件(并修改它们以更改时间戳),以实现这种命令?这似乎不是… node-ish …

在cmd窗口中键入:
type nul > your_file.txt

这将创建0个字节的your_file.txt文件。

使用echo命令的另一种方法是

echo.>your_file.txt

回声。 – 将在其中创建一个空行的文件。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读