find 是区分大小写的。对于不区分大小写的写法(转载)

转自:http://justwinit.cn/post/3633/

 

默认情况下,find 是区分大小写的。对于不区分大小写的 find,将 -iname 测试替换为 -name 测试。

find downloads  -iname "*.gif"
downloads/.xvpics/Calendar05_enlarged.gif
downloads/lcmgcfexsmall.GIF

[~/find]# ll
total 12K
-rw-r--r-- 1 root 5 2010-10-12 15:13 aa.txt
-rw-r--r-- 1 root 5 2010-10-12 15:10 a.txt
-rw-r--r-- 1 root 5 2010-10-12 15:10 A.TXT

不区分大小写的find命令的写法:

[~/find]# find . -iname "a.txt"  
./A.TXT
./a.txt

作者:justwinit@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:http://justwinit.cn/post/3633/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!

posted on 2015-04-24 19:47  次奥砖家  阅读(2931)  评论(0编辑  收藏  举报

导航