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
Asked
Active
Viewed 633 times
1 Answers
2
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.
-
1If it's a large amount of text add --color to highlight the string, -n option to print out line numbers, and -l (the lower case letter "L") to print the file name. I typically end up forming this command as `grep -lin 'something' *` – Rick Jan 23 '16 at 16:36