比如我们要在目录/usr/local/nginx/conf/vhost/下查找baidu.com这个关键字的文件
方法1:
find /usr/local/nginx/conf/vhost/ -exec grep "baidu.com" ‘{}‘ \; -print
方法2:grep -R "baidu.com" /usr/local/nginx/conf/vhost/*
bash 在指定目录查找包含特定关键字的文件
原文:https://www.cnblogs.com/tochw/p/13066512.html