当前位置:网站首页>如何统计项目代码行数
如何统计项目代码行数
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之管道符详解
边栏推荐
- SSM integration
- MAC OSX php dyld: Library not loaded: /usr/local/xxxx. dylib
- Redis fault handling "can't save in background: fork: cannot allocate memory“
- [南京大学]-[软件分析]课程学习笔记(一)-introduction
- QT charts use (rewrite qchartview to realize some custom functions)
- Download and install orcale database11.2.0.4
- Exercise arrangement 2.10, 11
- Three usage scenarios of annotation @configurationproperties
- Composer change domestic image
- uniapp 微信小程序监测网络
猜你喜欢

SSM integration

Componentspace2022, assertions, protocols, bindings, and configuration files

Rapid integration of authentication services - harmonyos platform

Greenplum 6.x build_ install

Greenplum 6.x reinitialization

Greenplum 6.x version change record common manual

JS operation

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

Analysis of using jsonp cross domain vulnerability and XSS vulnerability in honeypot

数据分片介绍
随机推荐
为什么要选择云原生数据库
mysql分区讲解及操作语句
平台化,强链补链的一个支点
如何在HarmonyOS应用中集成App Linking服务
oracle一次性说清楚,多种分隔符的一个字段拆分多行,再多行多列多种分隔符拆多行,最终处理超亿亿。。亿级别数据量
Greenplum6.x监控软件搭建
IP地址的类别
快速集成认证服务-HarmonyOS平台
opencv 将16位图像数据转为8位、8转16
National SMS center number inquiry
Greenplum6.x搭建_环境配置
Rapid integration of authentication services - harmonyos platform
Why choose cloud native database
FPGA knowledge accumulation [6]
Category of IP address
Three series of BOM elements
Uniapp wechat applet monitoring network
A single game with goods increased by 100000, and the rural anchor sold men's clothes on top of the list?
数据分片介绍
About using CDN based on Kangle and EP panel