查找包含某关键词的所有文件,可以结合find、xargs、grep命令进行查找,命令如下:
【find -type f -name '*'|xargs grep '关键词'】
示例:查找包含关键词‘apple’的所有后缀名为json的文件:
【find -type f -name '*.json' | xargs grep 'apple'】
查找包含某关键词的所有文件,可以结合find、xargs、grep命令进行查找,命令如下:
【find -type f -name '*'|xargs grep '关键词'】
示例:查找包含关键词‘apple’的所有后缀名为json的文件:
【find -type f -name '*.json' | xargs grep 'apple'】