'ls' 不是内部或外部命令、可运行程序或批处理文件 [英] 'ls' is not recognized as an internal or external command, operable program or batch file
问题描述
'ls' 不是内部或外部命令、可运行程序或批处理文件.当我尝试浏览文件夹中的文件时出现此错误.
'ls' is not recognized as an internal or external command, operable program or batch file. I get this error when I try to glance at the files of my folder.
- cmd 定期打开(不是以管理员身份).
我最近为python下载了anaconda.在安装过程中,有一段时间我允许添加不推荐的PATH.'ls' 过去很好用是
- cmd opened regularly(not as an admin).
I've recently downloaded anaconda for python.During the installation process, there was a time when I allowed to add a PATH which was not recommended. 'ls' used to work well be
这里是路径
推荐答案
我很确定 ls
命令适用于 Linux,而不是 Windows(我假设您使用 Windows 作为您提到了 cmd
,这是 Windows 操作系统的命令行).
I'm fairly certain that the ls
command is for Linux, not Windows (I'm assuming you're using Windows as you referred to cmd
, which is the command line for the Windows OS).
您应该改用 dir
,它在 Windows 中等效于 ls
.
You should use dir
instead, which is the Windows equivalent of ls
.
编辑(因为这篇文章似乎获得了如此多的浏览量:)):
您不能在 cmd
上使用 ls
,因为它没有随 Windows
提供,但您可以使用它在其他终端程序(如 GitBash)上.注意,如果服务器是基于 linux
并且 FTP
正在从cmd
.
You can't use ls
on cmd
as it's not shipped with Windows
, but you can use it on other terminal programs (such as GitBash). Note, ls
might work on some FTP
servers if the servers are linux
based and the FTP
is being used from cmd
.
dir
类似于ls
.要找出可用的各种选项,只需执行 dir/?
.
dir
on Windows
is similar to ls
. To find out the various options available, just do dir/?
.
如果你真的想使用 ls
,你可以安装 3rd 方工具来让你在 Windows
上运行 unix
命令.这样的程序是 Microsoft Windows Subsystem for Linux
(文档链接).
If you really want to use ls
, you could install 3rd party tools to allow you to run unix
commands on Windows
. Such a program is Microsoft Windows Subsystem for Linux
(link to docs).
这篇关于'ls' 不是内部或外部命令、可运行程序或批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!