- Open SQL Server Management Studio
- In the toolbar, click Edit
- Hover over Find and Replace and click Find in Files
- Fill in the Find what section with the content you wish to find.
- Click the ... to select the folder you wish to search through. For example: C:\inetpub\vhosts\domain.com\httpdocs
- Click the > to add the folder to the selected folders list. Multiple folders can be selected, if needed.
- Click OK and click Find All.
- SQL Management Studio will produce a list of files, and the line number that that particular piece of content was found on.
- CD to the directory you wish to search. For example: /var/www/vhosts/domain.com/httpdocs
- Type the following command: grep -rnw '.' -e "CONTENT", and replace CONTENT with what you are searching for.
- Hit enter, and output will produced with a list of files and the line number that that particular piece of content was found on.
- If there is a lot of output, it might be ideal to append > output.txt to the end of the command, which will redirect the output to "output.txt", which can be opened with a text editor (nano output.txt).
Article ID: 2244, Created: August 1, 2015 at 11:13 AM, Modified: September 15, 2016 at 2:39 PM