Powershell 获取childitem属性速记语法选项
从Powershell v3.0开始,以下语法可用于Powershell 获取childitem属性速记语法选项,powershell,powershell-3.0,get-childitem,Powershell,Powershell 3.0,Get Childitem,从Powershell v3.0开始,以下语法可用于Get ChildItem: dir -af 它应用某些属性选择标准。通过实验,我发现这意味着: dir -File 与此相同: dir -Attributes !Directory 有关于属性速记语法的官方参考吗?它在MSDN上指定: 在页面上搜索af,第二个匹配项: Directory d, ad File af Hidden h, ah ReadOnly ar System as 也可以通过get Help dir-full
Get ChildItem
:
dir -af
它应用某些属性选择标准。通过实验,我发现这意味着:
dir -File
与此相同:
dir -Attributes !Directory
有关于属性速记语法的官方参考吗?它在MSDN上指定:
af
,第二个匹配项:
Directory d, ad
File af
Hidden h, ah
ReadOnly ar
System as
也可以通过
get Help dir-full
,参见Notes
部分,在Example 1
之前,在MSDN上指定:
af
,第二个匹配项:
Directory d, ad
File af
Hidden h, ah
ReadOnly ar
System as
也可以通过
get Help dir-full
,参见Notes
部分,在Example 1
之前,在MSDN上指定:
af
,第二个匹配项:
Directory d, ad
File af
Hidden h, ah
ReadOnly ar
System as
也可以通过
get Help dir-full
,参见Notes
部分,在Example 1
之前,在MSDN上指定:
af
,第二个匹配项:
Directory d, ad
File af
Hidden h, ah
ReadOnly ar
System as
也可以通过
get Help dir-full
,参见Notes
部分,在Example 1
之前,我有PowerShell v4,这些参数别名列在内置帮助文件中,这就是我看到它们的方式
Help Get-ChildItem -full
向下滚动
注意
Get-ChildItem Alias Reference:
---------------------------------
Get-ChildItem dir
Directory d, ad
File af
Hidden h, ah
ReadOnly ar
System as
作为别名,您需要使用-(减号)来引入它们
注1:我发现“ad”只列出目录,而“d”也会列出文件
注2:我发现-force在查找隐藏文件或文件夹时特别有用。我有PowerShell v4,这些参数别名列在内置帮助文件中,我就是这样看到的
Help Get-ChildItem -full
向下滚动
注意
Get-ChildItem Alias Reference:
---------------------------------
Get-ChildItem dir
Directory d, ad
File af
Hidden h, ah
ReadOnly ar
System as
作为别名,您需要使用-(减号)来引入它们
注1:我发现“ad”只列出目录,而“d”也会列出文件
注2:我发现-force在查找隐藏文件或文件夹时特别有用。我有PowerShell v4,这些参数别名列在内置帮助文件中,我就是这样看到的
Help Get-ChildItem -full
向下滚动
注意
Get-ChildItem Alias Reference:
---------------------------------
Get-ChildItem dir
Directory d, ad
File af
Hidden h, ah
ReadOnly ar
System as
作为别名,您需要使用-(减号)来引入它们
注1:我发现“ad”只列出目录,而“d”也会列出文件
注2:我发现-force在查找隐藏文件或文件夹时特别有用。我有PowerShell v4,这些参数别名列在内置帮助文件中,我就是这样看到的
Help Get-ChildItem -full
向下滚动
注意
Get-ChildItem Alias Reference:
---------------------------------
Get-ChildItem dir
Directory d, ad
File af
Hidden h, ah
ReadOnly ar
System as
作为别名,您需要使用-(减号)来引入它们
注1:我发现“ad”只列出目录,而“d”也会列出文件
注2:我发现-force在查找隐藏文件或文件夹时特别有用