wc
Command (Unix/Linux/Mac)
You can use the wc (word count) command in the terminal to count lines in files. To count lines in all .cc
and .h
files in your project, you can navigate to your project directory and run:
$ find . -name '*.cc' -o -name '*.h' | xargs wc -l
Command to Count .c
Files
$ find . -name '*.c' | wc -l