grep的时候Binary file matches 怎么解决

2026年09月24日 02:33
有1个网友回答
网友(1):

  解决方法:grep -a "xxx" a.log

可以看看grep -a参数的功能

[appadmin@test3 ~/tmp]$ grep --help |grep '/-a'
-a, --text equivalent to --binary-files=text

即,让二进制文件等价于文本文件