Matlab dir()永远运行 [英] Matlab dir() takes forever to run

查看:147
本文介绍了Matlab dir()永远运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在目录中使用命令dir,具有500,000个文件。现在已经运行了15分钟。

I'm using the command "dir" on a directory with 500,000 files. It's been running for 15 minutes now.

有没有办法加速?一个替代的命令可能?

Is there any way to speed it up? an alternative command perhaps?

提前感谢

Gil。

推荐答案

如果您只想要文件名,请尝试 files = ls; 。根据帮助,我相信 ls 应该适用于任何操作系统。 dir 在这种情况下需要很长时间才能计算每个文件的文件大小,修改日期等。

If you just want file names, try files = ls;. As per the help, I believe ls should work on any OS. The reason dir takes so long in your case is that it's calculating the file size, modification date, etc. of each file.

这篇关于Matlab dir()永远运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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