Reference Information. I am trying to get the total number of lines of all code files (.html | .htm | .php | .js | .css) in my root web directory (recursively) by passing this output to xargs wc -l | grep total xargs wc -l | grep total .
$ find . -regex '.+\.php' ./inc/db.php ./inc/userauth.php ./index.php .......... etc. $ find . -regex '.+\.js' ./inc/jquery-1.7.1.js ./inc/script.js $ find . -regex '.+\.(php|js)' (returns nothing)
According to this ,
abc(def|xyz) matches abcdef or abcxyz
So you shouldn't .+\.(php|js) match all .php and .js files?
source share