Step 1:
Open the terminal, use the cd command to locate the directory where the project is located, and then call the following naming to put each The number of lines and the total number of source code files are counted:
find . "(" -name "*.m" -or -name "*.mm" -or -name "*.cpp" -or -name "*.h" -or -name "*.rss" ")" -print | xargs wc -l
Where -name "*.m" means a file with the extension .m. At the same time, the commands to count java files and xml files are:
find . "(" -name "*.java" ")" -print | xargs wc -l
as well as:
find . "(" -name "*.xml" ")" -print | xargs wc -l
The final result looks like the image below: