当前位置:网站首页>如何统计项目代码行数
如何统计项目代码行数
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之管道符详解
边栏推荐
- Count sort (diagram)
- Database storage - table partition
- [Chongqing Guangdong education] accounting reference materials of Nanjing University of Information Engineering
- GoLand set goproxy
- 9c09730c0eea36d495c3ff6efe3708d8
- Pointer advanced, string function
- MAC OSX php dyld: Library not loaded: /usr/local/xxxx. dylib
- Explain Huawei's application market in detail, and gradually reduce 32-bit package applications and strategies in 2022
- ncs成都新电面试经验
- Enterprise manager cannot connect to the database instance
猜你喜欢
Greenplum6.x搭建_安装
Introduction to data fragmentation
A bug using module project in idea
Merge sort and non comparison sort
最长上升子序列模型 AcWing 1017. 怪盗基德的滑翔翼
About using CDN based on Kangle and EP panel
Greenplum 6.x version change record common manual
如何在HarmonyOS应用中集成App Linking服务
let const
All about PDF crack, a complete solution to meet all your PDF needs
随机推荐
如何在图片的目标中添加目标的mask
leetcode135. Distribute candy
最长上升子序列模型 AcWing 1017. 怪盗基德的滑翔翼
Shell script for changing the current folder and the file date under the folder
使用AGC重签名服务前后渠道号信息异常分析
About using CDN based on Kangle and EP panel
IP地址的类别
Greenplum6.x搭建_安装
[wechat applet: cache operation]
QT charts use (rewrite qchartview to realize some custom functions)
阿里p8手把手教你,自动化测试应该如何实现多线程?赶紧码住
AVL balanced binary search tree
JS的操作
Database storage - table partition
Basic data types and string types are converted to each other
How to add a mask of a target in a picture
Three series of BOM elements
Gson converts the entity class to JSON times declare multiple JSON fields named
【踩坑】nacos注册一直连接localhost:8848,no available server
opencv之图像分割