这个问题我面试遇到了两次,都是大公司的,挂了,哎,刚刚看到了,做个记录:
参考:https://www.cnblogs.com/xiangsj/p/9065336.html
//.点为查找当前目录 下 的 所有 *.php 文件里 有 hello 的文件
find . -name "*.php" | xargs grep "hello"
//根目录
find / -name "*.php" | xargs grep "hello"
这个问题我面试遇到了两次,都是大公司的,挂了,哎,刚刚看到了,做个记录:
参考:https://www.cnblogs.com/xiangsj/p/9065336.html
//.点为查找当前目录 下 的 所有 *.php 文件里 有 hello 的文件
find . -name "*.php" | xargs grep "hello"
//根目录
find / -name "*.php" | xargs grep "hello"