Recursive Word Count in Terminal
Tuesday, January 2nd, 2007I’ve recently wondered about how to recursively count the number of lines within a series of files within a directory hierarchy. The command that I came up with is:
wc -l `find . -name \*.java -print`
The output is very readable, since it prints both the filename and the number of lines.
Enjoy!
Technorati Tags:
Terminal, Shell Script