Monday, July 19, 2010

Linux recursive search finding text patterns inside files

find "path to search" -type f -exec grep -i "phrase to find" {} \; -print

1 comment:

  1. if you have - in the "phrase to find"
    you will get grep:unknown device error. Remove the leading - and search for the rest of the string instead

    D_FILE_OFFSET_BITS==64

    ReplyDelete