Often times you want to search for a string pattern in all the files under a directory and its sub-directories.
Simply run this:
find . | xargs grep whatever
For example:
find . -name "*.txt" | xargs grep for
Output:
/cygdrive/c
[sohel@laptop] $ cat temp/post.txt
Time for an Upgrade.
It's about that time where your PC needs an upgrade. There was nothing wrong with my existing setup, but I figured, hey why not?
/cygdrive/c
[sohel@laptop] $ find . -name "*.txt" | xargs grep for
temp/post.txt:Time for an Upgrade.