grep:Binary file (standard input) matches

 

grep:Binary file (standard input) matches

tail -f xxx.log |grep "key"时打印

Binary file (standard input) matches

原因:grep认为这是二进制文件,but我的日志确实不是二进制。。估计和里面的不可见字符有关,grep了一下google,找到解决方案:grep -a。

tail -f xxx.log |grep -a "key"

搞定,存档备份

你可能感兴趣的:(grep)