how to check how many times a word is used in linux file code example Example: linux count number of times word appears in file grep -o 'word' filename | wc -l