当前位置:网站首页>如何统计项目代码行数
如何统计项目代码行数
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之管道符详解
边栏推荐
- Greenplum 6.x monitoring software setup
- All about PDF crack, a complete solution to meet all your PDF needs
- Appeler l'interface du moteur de création du service multimédia de jeu Huawei renvoie le Code d'erreur 1002, le message d'erreur: les paramètres sont l'erreur
- Implementation of navigation bar at the bottom of applet
- Novice entry SCM must understand those things
- Input and output of floating point data (C language)
- How to add a mask of a target in a picture
- Exercise arrangement 2.10, 11
- mysql分区讲解及操作语句
- 最长上升子序列模型 AcWing 1017. 怪盗基德的滑翔翼
猜你喜欢
A single game with goods increased by 100000, and the rural anchor sold men's clothes on top of the list?
Componentspace2022, assertions, protocols, bindings, and configuration files
NCS Chengdu New Electric interview Experience
Compilation and linking of programs
Greenplum 6.x reinitialization
数据分析方法论与前人经验总结2【笔记干货】
阿里p8推荐,测试覆盖率工具—Jacoco,实用性极佳
ncs成都新電面試經驗
南京商品房买卖启用电子合同,君子签助力房屋交易在线网签备案
oracle一次性说清楚,多种分隔符的一个字段拆分多行,再多行多列多种分隔符拆多行,最终处理超亿亿。。亿级别数据量
随机推荐
【踩坑】nacos注册一直连接localhost:8848,no available server
QT charts use (rewrite qchartview to realize some custom functions)
Are you holding back on the publicity of the salary system for it posts such as testing, development, operation and maintenance?
Test pits - what test points should be paid attention to when adding fields to existing interfaces (or database tables)?
[kuangbin] topic 15 digit DP
Greenplum6.x搭建_环境配置
Lenovo hybrid cloud Lenovo xcloud: 4 major product lines +it service portal
南京商品房买卖启用电子合同,君子签助力房屋交易在线网签备案
说一个软件创业项目,有谁愿意投资的吗?
Nanjing commercial housing sales enabled electronic contracts, and Junzi sign assisted in the online signing and filing of housing transactions
[Yu Yue education] C language programming reference of Zhongbei College of Nanjing Normal University
POJ - 3616 Milking Time(DP+LIS)
Introduction to data fragmentation
Shell script for changing the current folder and the file date under the folder
Exercise arrangement 2.10, 11
数据分片介绍
Input and output of floating point data (C language)
Upload an e-office V9 arbitrary file [vulnerability recurrence practice]
What is the method of manual wiring in PCB design in 22protel DXP_ Chengdu electromechanical Development Undertaking
Required String parameter ‘XXX‘ is not present