Linux grep 命令報錯:binary file (standard input) matches cat

場景: 在linux服務器上查看日誌,使用以下命令:linux cat root.log | grep  "xxxxxxxxxx"服務器 報錯:spa binary file (standard input) matches cat 日誌 緣由:意思爲文件是二進制文件,不能直接grepinput 解決方案:file cat root.log | grep -a  "xxxxxxxxxx" 二進制
相關文章
相關標籤/搜索