1.grep 字符串搜忽略
搜索以xx字符开头
grep "^void" test.c
搜索以xx字符结尾
grep "(void)$" test.c
忽略搜索的字符串大小写
grep -i "void" test.c
忽略特定文件
grep "void" *.c --exclude=test.c
忽略特定文件夹
grep -r "void" *.c --exclude-dir=build
2. 文件查找
在当前目录下递归搜索某类文件(c文件)
find . -name "*.c"
查找指定文件中的特定字符串
find . -name "*.ch"|xargs grep -i "void"