【问题标题】:What is DIR command a substitute of in PowerShellPowerShell中DIR命令的替代品是什么
【发布时间】:2014-06-27 17:10:57
【问题描述】:

我知道我可以使用 DIR 列出目录并使用 MKDIR 创建一个新目录。但是,我今天了解到,可以(应该?)使用 New-Item -ItemType Directory "c:\pip" 代替,这实际上看起来更像 PowerShellish。

但是,当我搜索 DIR 的等效项时,我没有得到任何点击。 DIR 只是 DIR 吗?

【问题讨论】:

    标签: powershell


    【解决方案1】:

    dir | ls == get-childitem.

    您可以使用 get-alias 命令找出别名:get-alias dir。别名的使用相当频繁,例如,gci 也是 get-childitem 的别名。

    【讨论】:

      猜你喜欢
      • 2021-11-30
      • 1970-01-01
      • 1970-01-01
      • 2019-02-22
      • 2011-05-07
      • 2012-04-24
      • 2019-12-03
      • 2010-09-17
      • 2012-03-27
      相关资源
      最近更新 更多