grep1 Binary file (standard input) matches 문자열이 들어간 파일을 grep 하는데 아래와 같은 에러 메시지가 뜬다. Binary file (standard input) matches 이유는 grep 한 파일이 binary 파일이라고 인지했기 때문이다. 이걸 해결하기 위해서는 grep 옵션 중 -a 를 이용하면 된다. 아래처럼 출력쪽 옵션을 보면 검색할 파일을 text로 인지하도록 해준다. Output control: -a, --text equivalent to --binary-files=text :# grep "found" test_file Binary file test_file matches :# grep "found" test_file -a found 2021. 8. 5. 이전 1 다음 반응형