|
|
Question : Search Files within Subdirectories for String Recursively
|
|
I have the following directory:
/opt/apps/mydir
Under "mydir" I have multiple subdirectories. I would like to search each of the files within those subdirectories for the string "mystring". What's the best way to accomplish this?
|
Answer : Search Files within Subdirectories for String Recursively
|
|
try:
find /opt/apps/mydir -type f | xargs grep "mystring" > search_results.log
|
|
|
|