programing

Grep '이진 파일 일치'입니다.정상적인 grep 출력을 얻는 방법은 무엇입니까?

subpage 2023. 5. 14. 10:41
반응형

Grep '이진 파일 일치'입니다.정상적인 grep 출력을 얻는 방법은 무엇입니까?

디렉터리를 재귀적으로 검색하는 grep 스크립트가 있습니다.

grep -n -R -e 'search term' -e 'second search term' ./ 

하지만 제가 받은 결과는 다음과 같습니다.JPG에 일치하는 항목이 있지만 실제 결과는 없습니다.

Binary file ./jpg/00015928.jpg matches
Binary file ./jpg/00015296.jpg matches
Binary file ./jpg/00020072.jpg matches

일반 grep 검색처럼 출력에서 결과를 볼 수 있는 방법이 있습니까?

시도:

grep --text

또는

grep -a 

요컨대이는 다음과 같습니다.--binary-files=text이진 파일에 일치하는 내용을 표시해야 합니다.

언급URL : https://stackoverflow.com/questions/23512852/grep-binary-file-matches-how-to-get-normal-grep-output

반응형