无法将"ls"识别为内部或外部命令,可操作程序或批处理文件 [英] 'ls' is not recognized as an internal or external command, operable program or batch file

查看:101
本文介绍了无法将"ls"识别为内部或外部命令,可操作程序或批处理文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

'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)上.请注意,如果某些 FTP 服务器基于 linux ,并且正在使用 FTP ,则 ls 可能在某些 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 ,则可以安装第三方工具,以允许您在 Windows 上运行 unix 命令.这样的程序是 Linux的Microsoft Windows子系统(链接到文档).

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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆