As a project manager, it is important to understand the overall situation of the project, previously through the IntelliJ statitic plug-in statistical code situation, but now the Android Studio2 can not be used, so had to be counted by other methods. You can find the regular expression directly through the Find function \ n and the following command line simple statistics, but the statistical dimension does not have plug-in so detailed, everyone who has better statistical tools can comment ah
Open the terminal and use the CD command to navigate to the directory where the project resides, and then call the following name to count the number of lines and totals for each source code file:
Find. "("-name "*.m"-or-name "*.mm"-or-name "*.cpp"-or-name "*.h"-or-name "*.rss" ")"-print | Xargs wc-l
where-name "*.M" represents a file with an. m extension. The commands to count both Java files and XML files are:
Find. -name "*.java"-print | Xargs wc-l
Find. -name "*.xml"-print | Xargs wc-l
To count lines of code using the command line