How do I find files containing a specific text on Linux systems?
The easiest way is via your favourite terminal app (aka the CLI):
- Navigate into the directory you want to search
grep -iRl "[text string]" .
The output will be a list of files (if any) containing the exact [text string] you specified.
To clarify the ‘-iRl’:
- i: ignore text case
- R: recursive. search the current folder, and all subdirectories
- l: return file names instead of sniplets of code
Was this answer helpful ? Yes (1) / No (0)