相关疑难解决方法(0)

在PowerShell错误消息中使用touch命令创建新文件

我的桌面上有一个使用PowerShell创建的目录,现在我正在尝试在其中创建一个文本文件.

我确实将目录更改为新目录,然后键入touch textfile.txt.

这是我收到的错误消息:

touch : The term 'touch' is not recognized as the name of a cmdlet, function, 
script file, or operable program. Check the spelling of the name, or if a path was 
included, verify that the path is correct and try again.

At line:1 char:1
+ touch file.txt
+ ~~~~~
+ CategoryInfo          : ObjectNotFound: (touch:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException`
Run Code Online (Sandbox Code Playgroud)

为什么不起作用?我是否必须一直使用Git Bash?

git powershell

9
推荐指数
6
解决办法
2万
查看次数

标签 统计

git ×1

powershell ×1