grep --help -R, -r, --recursive equivalent to --directories=recurse -l, --files-with-matches print only names of FILEs containing matches 递归查找目录下面的文件 l找到符合的文件
[root@db01 data]# echo "tttt" >aa.txt
[root@db01 data]# echo "tttt" >bb.txt
[root@db01 data]# cd ..
[root@db01 /]# grep -rl tttt /data/
/data/bb.txt
/data/mysql/general.log
/data/aa.txt