从find命令不区分大小写吗?


93

我无法弄清楚如何使用find命令进行不区分大小写的搜索。

我试过了

find . -name -i pattern

而且它不起作用。

Answers:



39

我相信是: find . -iname pattern

来自man find

-iname pattern
       Like  -name, but the match is case insensitive.

10
sudo updatedb

locate -i "nameofthefile"

nameofthefile 应该没有倒逗号。


值得注意的是,这是系统范围内搜索的最快方法。
2014年
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.