Mar 11, 2003 #1 Kenton Technical User May 7, 2002 30 AU This is probably REALLY easy ... How can I search for a specific string within files in a directory and all its subdirectories? ie I want to find the string "fred" in all the *.sh files in all subdirectories of /home Thanks Kenton
This is probably REALLY easy ... How can I search for a specific string within files in a directory and all its subdirectories? ie I want to find the string "fred" in all the *.sh files in all subdirectories of /home Thanks Kenton
Mar 11, 2003 #2 vgersh99 Programmer Jul 27, 2000 2,146 US find /home -type f -name '*.sh' | xargs grep fred vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+ Upvote 0 Downvote
find /home -type f -name '*.sh' | xargs grep fred vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+