Powershell中的“cat”命令是什么意思?

powershell.exe -ExecutionPolicy Bypass -C "get-process >> $env:APPDATAtest.log; cat $env:APPDATAtest.log"

大家好,谁能翻译一下powershell中的cat是什么?或者如果你特别好告诉我整个脚本在说什么?我在我的 VM 中运行它,但我仍然不理解它。

回答

PowerShell 具有丰富的反射功能。

要了解给定命令所指的内容,请使用Get-Commandcmdlet:

# On *Windows*
PS> Get-Command cat

CommandType     Name                                               Version    Source                                                                           
-----------     ----                                               -------    ------                                                                           
Alias           cat -> Get-Content                                                                                                                             

这就告诉你,cat是一个别名Get-Contentcmdlet的。

# On *Unix*-like platforms (macOS, Linux)
PS> Get-Command cat

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Application     cat                                                0.0.0.0    /bin/cat

这告诉您,cat指的是位于(标准Unix 实用程序)的外部程序(应用程序)。/bin/catcat


以上是Powershell中的“cat”命令是什么意思?的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>