0

I want to find all text files containing source-code like class="some class". When using the Finder search, it is not working, seems like Finder is looking for "some class". Recommendations to other programs are welcome, too.

3 Answers 3

1

Try this in the Terminal:

grep -r 'class="some class"' .

You can replace that "." with any dirname you want, or a filename pattern like *.css, etc.

0

I'd try EasyFind, freeware on the App Store. Can check inside packages & also use strict or fuzzy search. It's not massively fast, but it does get there.

1
  • I found this too, did not work for finding text inside files at all for me.
    – Pwdr
    Aug 11, 2014 at 17:07
0

I would try escaping the quotes with one or two backslashes:

class=\\"some class\\"

From the command line could be easier: http://support.apple.com/kb/TA25275

As in traditional BSD unix, the backslash character, "\", may be used before an illegal character to cause it to be parsed as part of the search string:

find / -name Mac\\ NC\\ # -print &

1
  • Then Finder won’t find anything…
    – Pwdr
    Aug 11, 2014 at 22:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .