Liunx常用操作(三)-如何忽略大小写查找

1.vim 中的查找

搜索文件内容时加上 /c 参数可以忽略搜索字符的大小写

正常搜索:/helloworld

忽略操作:/helloworld/c

2.find 查找

使用find命令搜索文件时如果不清楚文件的名称中是否包含的大写,你可以使用 -iname参数来忽略大小写

正常查找:[root@liunx]# find ./ -name helloworld

忽略操作:[root@liunx]# find ./ -iname helloworld

3.grep 查找

用管道grep 匹配关键词时如果需要忽略大小写,你可以使用 -i 参数.

正常查找:[root@liunx]#cat test001.txt | grep true 

忽略操作:[root@liunx]#cat test001.txt | grep true -i

原文地址:https://www.cnblogs.com/mrwhite2020/p/12790409.html