grep 二进制文件grep "AMI" 2012-11-23.log Binary file 2012-11-23.log matches

file 2012-11-23.log
2012-11-23.log: data
grep "AMI" 2012-11-23.log
Binary file 2012-11-23.log matches

错误是因为grep不能处理二进制的文件,加上-a

-a, --text

Process a binary file as if it were text; this is equivalent to the --binary-files=text option.

 

你可能感兴趣的:(二进制,grep)