---
title: "linux命令grep"
author: "hellsing42"
date: "2009-07-08T11:24:00Z"
tags: []
slug: "linux-grep"
draft: false
lastmod: "2009-07-08T11:24:00Z"
id: 421718
url: "https://hellsing42.iteye.com/blog/421718"
---

grep "key" xxx.log时输出

Binary file xxx.log matches

百度了一下：grep认为这是二进制文件，解决方案：grep -a。

grep -a "key" xxx.log