There are various reasons to run a full-text (grep) or file search on your mod directory: maybe to identify which mod owns a specific item (when you only know its name), or when your log mentions a Def in an error without further context. Most commonly, you'll use it when instructed by a troubleshooter to provide info they can't get directly from your log.
Technically, any OS has built-in tools for this, but RimSort's file-search offers RimWorld-specific options tailored for issue investigation. Here's a basic guide to access and use it. We presume you already know what you're searching for - or a troubleshooter has given you specific instructions, including ideal settings for your specific case.
ATTENTION: The instructions below currently still show the process using RimPy. Since the current consensus is to switch to using RimSort though, we will shortly offer an up-to-date version, potentially archiving the instructions for RimPy to not cause any confusion!
Straight forward; access the file-search by clicking the "File Search" tab.
Your search term
Switch between active/inactive/all mods
Case sensitivity - keep it ON for most cases
Skip translations - keep it ON for most cases
XML only - you want to turn that ON unless told differently
Starting the search
Search results window
Name of mods found containing the search term
Specific files containing the search term.
File-search steps vary wildly by situation, so no universal guide exists. You'll typically get precise instructions from a troubleshooter - like searching for a specific defName from the log. In such a case, copy-paste it exactly, tweak settings as directed (or default), hit Search, and let it finish. Afterwards screenshot the full results (always include the entire UI with settings for quick verification), then send to whoever instructed you. They'll guide your next steps based on it.