Finding text inside a folder using terminal

I am trying to find a line of code in a folder and using the terminal. I use this command, which I think should work:

MacBook-Pro:myWordpress myId$ grep "<?php get_template_part('loop', 'archives'); ?>" -R

where the folder I am inspecting is called “myWordpress”. But I get this:

grep: warning: recursive search of stdin

I don’t use much the terminal, so I am unsure as to how to do what I want. Any help appreciated. Thanks

David

Leave a Comment