当前位置:网站首页>如何统计项目代码行数
如何统计项目代码行数
2022-07-07 06:17:00 【beibeix2015】
find . "(" -name "*" ")" -print | xargs wc -l
1、打开终端,用cd命令 定位到工程所在的目录。
2、调用以下命令即可把每个源代码文件行数及总数统计出来
(1)包括空行(会列出每个文件的代码行数):
find . "(" -name "*.m" -or -name "*.mm" -or -name "*.c" -or -name "*.h" -or -name "*.xib" -or -name "*.pch" ")" -print | xargs wc -l(2)不包括空行(只会出现总行数):
find . "(" -name "*.m" -or -name "*.mm" -or -name "*.c" -or -name "*.h" -or -name "*.xib" -or -name "*.pch" ")" -print | xargs grep -v "^$"|wc -l//如果有其它.后缀文件可以继续添加如-or -name "*.java"
3、回车
grep -v "^$"去掉空行注释也在代码行数统计之内
linux之管道符详解
边栏推荐
- [Yu Yue education] basic reference materials of electrical and electronic technology of Nanjing Institute of information technology
- Are you holding back on the publicity of the salary system for it posts such as testing, development, operation and maintenance?
- JS operation
- Find the original code, inverse code and complement of signed numbers [C language]
- Implementation of navigation bar at the bottom of applet
- [Yu Yue education] C language programming reference of Zhongbei College of Nanjing Normal University
- selenium自动化集成,八年测试经验软测工程师,一篇文章带你学懂
- LeetCode 715. Range 模块
- Shell script for changing the current folder and the file date under the folder
- ncs成都新電面試經驗
猜你喜欢

联想混合云Lenovo xCloud:4大产品线+IT服务门户

What is the method of manual wiring in PCB design in 22protel DXP_ Chengdu electromechanical Development Undertaking

LeetCode 715. Range 模块

数字三角形模型 AcWing 275. 传纸条

23 Chengdu instrument customization undertaking_ Discussion on automatic wiring method of PCB in Protel DXP

Calling the creation engine interface of Huawei game multimedia service returns error code 1002, error message: the params is error

ncs成都新电面试经验

【MySQL】数据库进阶之触发器内容详解

Greenplum6.x-版本变化记录-常用手册

Interpolation lookup (two methods)
随机推荐
Greenplum 6.x build_ install
Redis summary
mysql分区讲解及操作语句
Data type - integer (C language)
leetcode135. Distribute candy
QT charts use (rewrite qchartview to realize some custom functions)
String operation
Required String parameter ‘XXX‘ is not present
Greenplum6.x搭建_环境配置
What is the method of manual wiring in PCB design in 22protel DXP_ Chengdu electromechanical Development Undertaking
NCS Chengdu New Electric interview Experience
Image segmentation in opencv
IP guard helps energy enterprises improve terminal anti disclosure measures to protect the security of confidential information
21 general principles of wiring in circuit board design_ Provided by Chengdu circuit board design
[Yugong series] February 2022 U3D full stack class 006 unity toolbar
How to add a mask of a target in a picture
[hard core science popularization] working principle of dynamic loop monitoring system
Frequently Asked Coding Problems
Rapid integration of authentication services - harmonyos platform
POJ - 3616 Milking Time(DP+LIS)