例如:查找当前目录中有“os”字符串的文件名称
(1)第一种:find和grep组合运用。
find ./ -name “*.txt” -exec grep -l “yk” {} \ ;
(2)grep
grep -r "yk" /tmp -l
例如:查找当前目录中有“os”字符串的文件名称
(1)第一种:find和grep组合运用。
find ./ -name “*.txt” -exec grep -l “yk” {} \ ;
(2)grep
grep -r "yk" /tmp -l