문제

So I'm using this

grep -lrai "search query" /right/here/

to search for a word in 100+ pdf files (which is why I have included -a).

Using grep shows 3 results, whereas a simple search in Spotlight will show a lot more in the same directory.

Am i doing something wrong here?

도움이 되었습니까?

해결책

Using "-a" option does not magically convert PDF documents into plain text documents, unfortunately. If you need to grep search, you have to convert PDFs to text documents first (i.e. use this recipe: http://www.ehow.com/how_4794405_convert-pdf-word-document-mac.html).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top