how to count how many lines in a folder command line linux code example Example: count number of lines in directory linux find . -name '*.php' | xargs wc -l