2020-12-29 Linux finds which file a certain keyword is in

Linux finds which file a certain keyword is in

Requirement: There are "xx" keywords, but I forgot which file it is in, I need to find out.

solve:

# 在/home/目录下搜索带有关键字“info”的文件
find / –type f |xargs grep "info"
 
#或者
grep -r "info" /home

Guess you like

Origin blog.csdn.net/qingfengxd1/article/details/111931695