I trying to find total number of line code of .h and .m file.I dont know the command for this Please help me.
Asked
Active
Viewed 850 times
-1
-
Please read this link 1. http://stackoverflow.com/questions/2003534/how-to-find-out-how-many-lines-of-code-there-are-in-an-xcode-project 2. http://stackoverflow.com/questions/9769918/how-can-i-find-a-line-number-in-xcode – Dharmbir Singh May 02 '13 at 14:04
3 Answers
0
Try with wc
:
wc -l your_file
wc stands for word count
and with -l
flag it counts the number of lines.

fedorqui
- 275,237
- 103
- 548
- 598
0
find project-dir -name "*.[mh]" | xargs wc -l
This will find all files that end with the extension m or h and wc
will count lines in the files. The last line will contain the total.

FDinoff
- 30,689
- 5
- 75
- 96