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
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