grep命令提示"binary file matches **.log"解决方法

在查询日志的时候发现

提示了这个错

grep "binary file matches **.log"

grep test XXX.log
Binary file app.log matches
此时使用-a参数接口。

grep -a test XXX.log
-a, --text equivalent to --binary-files=text,即让二进制文件等价于文本。

注:zgrep遇到同样问题,解决方法也是类似。

posted @ 2022-10-22 12:54  自然对数  阅读(1615)  评论(0)    收藏  举报