Grep命令出现 Binary file (standard input) matches

在执行 tail -fn100 error.log | grep 'code been'命令时会出现 Binary file (standard input) matches的提示,说明系统把grep的输入当成一个二进制文件了,解决办法:
tail -fn100 error.log | grep -a 'code been'即可。

-a: 把二进制文件当成普通文本,效果和--binary-files=text

posted @ 2020-04-12 11:17  码农搬用工  阅读(10040)  评论(0编辑  收藏  举报