The Unix grep command-line tool is a way to search iteratively through files and folders for a particular string to match against a filename or the contents of a file.
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
Many ports of grep have been written for Windows. I use one called Windows Grep, but it hasn't been updated in some time. BareGrep, a simple search utility from Bare Metal Software, is simple, does almost everything Windows Grep does, and has some features that Windows Grep doesn't.
By default, BareGrep searches from your desktop on down (subfolders are also searched by default whenever you provide a folder name). Supply a file wildcard and it will return a matching list of all the files in that directory. Type in a search text and it will immediately begin to return full-text matches against that search term as you type.
If you'd rather start the search on demand (especially if you're searching a very large directory tree), you can turn off the immediate-search function easily enough, although on the different machines I tested it on, that function never slowed things down inordinately.
The user can also supply either a simple search term or a regular expression for either the filename or the text to match. The search can be case-sensitive or case-insensitive, and the matching can be inverted, i.e., you can search for everything that does not match the selected text as well.
Commonly used text searches, directory/path names or file wildcards can be saved and reused, and the results can be exported to a text file or to the clipboard. Double-click on a result and the file in question will be opened in the default editor for that file.
One thing that BareGrep does not support (which Windows Grep did) is search-and-replace. It's only good for reporting on (rather than editing) files en masse. But that it does well enough so if that's all you need, this tool is a good start.
About the author: Serdar Yegulalp is editor ofWindows Insight (formerly the Windows Power Users Newsletter), a blog site devoted to hints, tips, tricks and news for users and administrators of Windows NT, Windows 2000, Windows XP, Windows Server 2003 and Vista. He has more than 12 years of experience working with Windows, and contributes regularly to SearchWinComputing.com and other TechTarget sites.
More information on this topic:
- Tip: Global replace freeware tool supports regular expressions
- Topics: Admin tools
- RSS: Sign up for our RSS feed to receive expert advice every day.