linux count number of lines in file code example
Example 1: shell count number of lines
$ wc -l < /dir/file.txt
3272485
Example 2: count number of lines in directory linux
find . -name '*.php' | xargs wc -l
$ wc -l < /dir/file.txt
3272485
find . -name '*.php' | xargs wc -l