Terminal

Find files containing specific text

Published on May 25th, 2020

This helped me a lot whenever I'm in a remote server trying to find a keyword or specific text amongst a bunch of files.

This command will save you a lot of time:


grep -rwn [path] -e 'pattern'


• r stands for recursion
• n displays the line number
• w matches the whole word

Refer to man find pages for more info.