🌱 Search for a string in all files in given directory

Source

grep -R <stringToSearch> <dirName>

e.g to search “text” in current directory and all the files inside

grep -R "text" .

If you want to get number of occurrences use wc -l as pipe

grep -R "text" . | wc -l

Made by Brandon . If you find this project useful you can donate.