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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM