Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

tech0925

macrumors member
Original poster
Sep 4, 2009
90
0
I am a web designer and when I need to find something in my files it can be rather difficult. Lets say I want to find where the variable $example is defined and used, I don't want to have to open 100 php files and manually search for it in each one. Instead I would like something that could return these results without having to open the files. I am looking for some type of function like spotlight but that will search inside of closed documents as well.

Do you know of anything like this? Is this even available?

Thank you!!!
 
Can't you just open a finder window, set it to search file contents, and type in $example?

Thanks for this tip. How do i set it to search file contents? I don't see this option in the finder window preferences or the spotlight preferences..

To the other comment, thanks for pointing out grep. I will try MythicFrost's advice first if I can figure out where to set this option.

Thanks all
 
Thanks for this tip. How do i set it to search file contents? I don't see this option in the finder window preferences or the spotlight preferences..

To the other comment, thanks for pointing out grep. I will try MythicFrost's advice first if I can figure out where to set this option.

Thanks all
Hey, no worries.

Once you've opened a plain Finder window, type $example in the top right and then a small bar should appear underneath it that expands the width of the window, and you should have an option to search in "Title", "Contents", etc.

Let me know if it doesn't I'll check again for you and show a screenshot if necessary.

Cheers
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.