1.vim 中的查找

  Linux 下 vim搜索文件内容时加上 \c 参数可以忽略搜索字符的大小写.

  比如用vim 搜索文件中的 China 时

  可用 :/china\c

  2. find 查找

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

  [root@Blinux test]# ll

  总用量 0

  -rw-rw-r-- 1 Blinux root 0 12月 16 07:42 China

  [root@Blinux test]# find ./ -name china

  [root@Blinux test]# find ./ -iname china

  ./China

  3.grep 查找

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

  [root@Blinux test]# rpm -qa|grep virtualbox

  [root@Blinux test]# rpm -qa|grep virtualbox -i

  VirtualBox-3.1-3.1.0_55467_fedora12-1.i686

相关文章:

  • 2022-01-03
  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-23
  • 2022-12-23
  • 2021-12-10
猜你喜欢
  • 2021-12-11
  • 2021-11-30
  • 2022-12-23
  • 2022-12-23
  • 2021-10-29
  • 2022-12-23
  • 2022-01-25
相关资源
相似解决方案