how to count the number of words and lines using command line code example Example: count number of lines in directory linux find . -name '*.php' | xargs wc -l