Grepping uncompressed logs: find [filepath] -name '[filename]' -print0 | xargs -0 cat | grep '[需要查找的字符串]' >> /tmp/r.txt find [filepath] -name '[filename]' -print0 | xargs -0 cat | grep '[需要查找的字符串]' | grep '[需要查找的字符串]' Grepping archives/compressed logs: find [filepath] -name '[filename]' -print0 | xargs -0 zcat | grep '[需要查找的字符串]' | grep '[需要查找的字符串]' find [filepath] -name '[filename]' -print0 | xargs -0 zcat | grep '[需要查找的字符串]' |
|