Mar 11, 2003 #1 Kenton Technical User Joined May 7, 2002 Messages 30 Location 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 Joined Jul 27, 2000 Messages 2,146 Location 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> | +----------------------------+