I am trying to run the
find command to find the total number of occurrences of a particular text string and also the number of files which has this text string.
What I have right now is this command.
find . -name "*.txt" | xargs grep -i "abc"
This reports all the "*.txt" files which contain the text "abc". I want either one or two find command to get
- Total number of times abc appears
- Total number of files which has abc in it.