linux

grep binary

무세1 2018. 8. 31. 16:51

grep 명령어로 파일 검색시 아래와 같은 메세지가 발생.


> grep Exception a.log

Binary file a.log matches


a.log 파일이 Binary 파일이기 때문에 검색이 되지 않음.

-a 옵션을 넣어 주면 검색된다.


> grep -a Exception a.log