I’ll just put here for future reference:

This grep will search recursively across all files in a given path.

Selec All Code:
1
grep -HrnIFi --color=always searchterm .

Notes:

  • Replace the dot at the end with the top-folder to search in.
  • Remove the lower case ‘i’ to make the search case-sensitive.
  • Remove F if searchterm is a regular expression.

Shout-out: How to use “grep” command to find text including subdirectories

To run a search only for folder or file name, use the following.

Only folder names:

Selec All Code:
1
find . -type d -name scripts

Only file names:

Selec All Code:
1
find . -type f -name scripts

Learn more about the find command on Wikipedia.