首页 > 其他分享 >grep命令提示"binary file matches **.log"解决方法

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

时间:2022-10-22 13:00:27浏览次数:85  
标签:binary grep log matches text file

在查询日志的时候发现

提示了这个错

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遇到同样问题,解决方法也是类似。

标签:binary,grep,log,matches,text,file
From: https://www.cnblogs.com/zrds/p/16815915.html

相关文章