题
我需要找到所有 .psd
我的 Linux 系统(专用网络托管)上的文件。我尝试过这样的事情: ls -R *.psd
, ,但这不起作用。建议?
解决方案
您可以使用以下 find 命令来执行此操作:
find /path/to/search -iname '*.psd'
iname
进行不区分大小写的搜索。
其他提示
你也可以
ls ./**/*.psd
但:
- 你必须有 bash 版本 4+
- 你必须有
shopt -s globstar
#在你的 .bashrc 或 .profile 等中...... - 将搜索区分大小写(或者您必须设置
shopt -s nocaseglob
也)
不隶属于 StackOverflow