除去所有的c和h文件
grep "Language" * -nR --exclude={*.c,*.h}
从所有的c和h和p文件中搜索
grep "ccc" *.[chp] -nR
grep 'hello' ./ -nR --include="*.sh" --include="*.c"
除去具体的文件
grep "Language" * -nR --exclude-from=customer.conf
从搜索到的文件中搜索
find ./* -name "customer.conf" |xargs grep "tri"
find ./* -name "*.c" |xargs grep "tri"
查找多类型
1.无法查找cpp
find ./* -name "*.[h|c|o]"
2.
find ./* -regex ".*\.\(pro\|o\|h\)"
3.
find ./* -name "*.o" -o -name "*.c" -o -name "*.cpp"