count total number of lines in all files of a directory linux code example Example: count number of lines in directory linux find . -name '*.php' | xargs wc -l