尝试使用 ls -la 命令列出目录中的文件时出错

2024-03-15

因此,我尝试用来列出我的目录(我克隆到 vsc 的 github 存储库)中的所有文件的命令似乎不起作用。 Vsc是最新版本。

PS C:\VSCode\Git\test> ls -la
Get-ChildItem : A parameter cannot be found that matches parameter 
name 'la'.
At line:1 char:4
+ ls -la
+    ~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-ChildItem], 
ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand

您正在 Windows 上使用 Powershell。在 Windows 上的 Powershell 中,ls是一个别名Get-ChildItem https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-childitem?view=powershell-7.2。它不是ls*nix 上提供的命令。

请改用以下命令之一。

Get-ChildItem -Force
Get-ChildItem -Attributes Normal, Directory, Hidden

(请注意,这不是 git 问题,也不是 Visual Studio Code 问题。)

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

尝试使用 ls -la 命令列出目录中的文件时出错 的相关文章

随机推荐