免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2765 | 回复: 7
打印 上一主题 下一主题

find能否对大小写不敏感查询? [复制链接]

论坛徽章:
1
15-16赛季CBA联赛之吉林
日期:2016-07-02 18:10:16
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-03-09 13:13 |只看该作者 |倒序浏览
find . -name -i "*sfsp*"


好像不行啊

论坛徽章:
5
2015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:50:282015年亚洲杯之朝鲜
日期:2015-03-13 22:47:33IT运维版块每日发帖之星
日期:2016-01-09 06:20:00IT运维版块每周发帖之星
日期:2016-03-07 16:27:44
2 [报告]
发表于 2010-03-09 13:28 |只看该作者
位置放错了。-iname

论坛徽章:
33
ChinaUnix元老
日期:2015-02-02 08:55:39CU十四周年纪念徽章
日期:2019-08-20 08:30:3720周年集字徽章-周	
日期:2020-10-28 14:13:3020周年集字徽章-20	
日期:2020-10-28 14:04:3019周年集字徽章-CU
日期:2019-09-08 23:26:2519周年集字徽章-19
日期:2019-08-27 13:31:262016科比退役纪念章
日期:2022-04-24 14:33:24
3 [报告]
发表于 2010-03-09 13:42 |只看该作者
男人怎么说,你就怎么做。
       -iname pattern
              Like -name, but the match is case insensitive.  For example, the
              patterns `fo*' and `F??' match  the  file  names  `Foo',  `FOO',
              `foo',  `fOo',  etc.   In these patterns, unlike filename expan-
              sion by the shell, an initial '.' can be matched by  '*'.   That
              is, find -name *bar will match the file `.foobar'.   Please note
              that you should quote patterns as a matter of course,  otherwise
              the shell will expand any wildcard characters in them.

论坛徽章:
1
15-16赛季CBA联赛之吉林
日期:2016-07-02 18:10:16
4 [报告]
发表于 2010-03-10 14:41 |只看该作者
位置放错了。-iname
blackold 发表于 2010-03-09 13:28



     find . -iname *dba*
find: bad option -iname
find: [-H | -L] path-list predicate-list


不行,SOLARIS + KSH

论坛徽章:
33
ChinaUnix元老
日期:2015-02-02 08:55:39CU十四周年纪念徽章
日期:2019-08-20 08:30:3720周年集字徽章-周	
日期:2020-10-28 14:13:3020周年集字徽章-20	
日期:2020-10-28 14:04:3019周年集字徽章-CU
日期:2019-09-08 23:26:2519周年集字徽章-19
日期:2019-08-27 13:31:262016科比退役纪念章
日期:2022-04-24 14:33:24
5 [报告]
发表于 2010-03-10 14:50 |只看该作者
Solaris的问题
/usr/xpg4/bin/find

/usr/bin/find
都没有-iname选项

论坛徽章:
5
2015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:50:282015年亚洲杯之朝鲜
日期:2015-03-13 22:47:33IT运维版块每日发帖之星
日期:2016-01-09 06:20:00IT运维版块每周发帖之星
日期:2016-03-07 16:27:44
6 [报告]
发表于 2010-03-10 14:53 |只看该作者
看一下手册吧。

论坛徽章:
0
7 [报告]
发表于 2010-03-11 10:24 |只看该作者
发这种问题之前先man一下比较好

论坛徽章:
15
2015年辞旧岁徽章
日期:2015-03-03 16:54:15双鱼座
日期:2015-01-15 17:29:44午马
日期:2015-01-06 17:06:51子鼠
日期:2014-11-24 10:11:13寅虎
日期:2014-08-18 07:10:55酉鸡
日期:2014-04-02 12:24:51双子座
日期:2014-04-02 12:19:44天秤座
日期:2014-03-17 11:43:36亥猪
日期:2014-03-13 08:13:51未羊
日期:2014-03-11 12:42:03白羊座
日期:2013-11-20 10:15:18CU大牛徽章
日期:2013-04-17 11:48:45
8 [报告]
发表于 2010-03-12 14:05 |只看该作者
  1. find . |grep -i "*sfsp*"

  2. find . -name "*[Ss][Ff][Ss][Pp]*"
复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP