linux grep 批量文件时,显示文件名称

find . -name \*.log -print0 | xargs -0 grep -n -H "Something"

参考
Filenames and linenumbers for the matches of cat and grep

posted @ 2023-01-29 11:53  iyiluo  阅读(200)  评论(0)    收藏  举报