场景: 在linux服务器上查看日志,使用如下命令:
cat root.log | grep "xxxxxxxxxx"
报错:
binary file (standard input) matches cat
原因:意思为文件是二进制文件,不能直接grep
解决方案:
cat root.log | grep -a "xxxxxxxxxx"
场景: 在linux服务器上查看日志,使用如下命令:
cat root.log | grep "xxxxxxxxxx"
报错:
binary file (standard input) matches cat
原因:意思为文件是二进制文件,不能直接grep
解决方案:
cat root.log | grep -a "xxxxxxxxxx"