Forrest logo
back to the grep tool

grep:ai:a76de

Recursively search for 'text_to_search' in all files under /path/to/directory
$ grep -r 'text_to_search' ${directory}
try on your machine

Recursively search for 'text_to_search' in all files under /path/to/directory

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.

Questions that are answered by this command:

  • search for text in a file recursively?
back to the grep tool