Linux查找指定文件夹下中的问题包含特定字符内容的文件

find . -type f ! -path "./.gradle/*" ! -path "./.repo/*" ! -path "./.idea/*"  ! -path "./.git/*" ! -path "./*/*/build/*" ! -path "./*/.git/*" ! -path "./*/build/*" | xargs grep "sz.beautystore" > ../result

-type f - Specify to find that you only want files in the results 

-name "*_peaks.bed" - Look for files with the name ending in _peaks.bed 

! -path "./tmp/*" - Exclude all results whose path starts with ./tmp/ 

! -path "./scripts/*" - Also exclude all results whose path starts with ./scripts/

grep -n -r --exclude-dir='node_modules' --exclude-dir='logs' --exclude="nohup.out" 192 *

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容