find line number of word in linux file code example Example: count number of lines in directory linux find . -name '*.php' | xargs wc -l