grep in a document code example Example 1: grep in all files grep -rni "string" * Example 2: grep in folder grep -nr 'yourString*' .