How can I easily find a line of text which is on my website on the code in my server?

Posted on

Problem :

There is a line of text on my website which I would like to edit. Is there an easy way for me find/locate the folder and or sub folder where that line of text is located in the code on my server so I can go there, locate that line of text and edit it? Thanks

Solution :

Assuming you have SSH access, you can use grep:

grep -r "text you're looking for" /path/of/your/website

You can add the -i flag for case insensitive search.

You can add -n to get the line number of that occurrence.

Leave a Reply

Your email address will not be published. Required fields are marked *