Count all occurrences of a string in lots of files with grep September 27, 2022 by Tarik This works for multiple occurrences per line: grep -o string * | wc -l