In a project with thousands of files, I wanted to compare total lines-of-code, to lines-of-code just in PHP (discarding CSS, JS, etc).
When I run
find . -type f | xargs wc -l
I the total on the last line is lower than when I run
find -E . -regex '.+\.(php|inc)' -type f | xargs wc -l
Considering the second
find has to be a smaller list of files than (is a strict subset of) the first
find, how could
wc report a higher total in the second case?