2

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

OHW
  • 21
  • 1

1 Answers1

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.

Rick
  • 295
  • 1
  • 7
  • 20
Teun Vink
  • 2,415
  • 15
  • 18
  • 1
    If 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