当前位置:网站首页>How to count the number of project code lines
How to count the number of project code lines
2022-07-07 08:56:00 【beibeix2015】
find . "(" -name "*" ")" -print | xargs wc -l
1、 Open the terminal , use cd command Navigate to the directory where the project is located .
2、 Call the following command to count the number of lines and total number of each source code file
(1) Including the empty line ( The code lines of each file will be listed ):
find . "(" -name "*.m" -or -name "*.mm" -or -name "*.c" -or -name "*.h" -or -name "*.xib" -or -name "*.pch" ")" -print | xargs wc -l(2) Empty lines are not included ( Only the total number of rows will appear ):
find . "(" -name "*.m" -or -name "*.mm" -or -name "*.c" -or -name "*.h" -or -name "*.xib" -or -name "*.pch" ")" -print | xargs grep -v "^$"|wc -l// If there is anything else . Suffix files can continue to be added, such as -or -name "*.java"
3、 enter
grep -v "^$"Removing blank line comments is also included in the code line count
linux Detailed explanation of pipeline symbols
linux In command “|” Pipe symbol
边栏推荐
- Golang etcdv3 reports an error. The attribute in grpc does not exist
- idea里使用module项目的一个bug
- With an annual salary of 50W, Alibaba P8 will come out in person to teach you how to advance from testing
- Greenplum6.x重新初始化
- What are the advantages of commas in conditional statements- What is the advantage of commas in a conditional statement?
- let const
- go mod module declares its path as: gtihub. com/xxx-xx but was required as:xx-xx
- 面板显示技术:LCD与OLED
- let const
- Nanjing commercial housing sales enabled electronic contracts, and Junzi sign assisted in the online signing and filing of housing transactions
猜你喜欢
随机推荐
如何统计项目代码行数
Greenplum6.x搭建_环境配置
【MySQL】数据库进阶之触发器内容详解
Implement custom memory allocator
Upload an e-office V9 arbitrary file [vulnerability recurrence practice]
Analysis of using jsonp cross domain vulnerability and XSS vulnerability in honeypot
let const
Greenplum 6.x version change record common manual
指针进阶,字符串函数
求有符号数的原码、反码和补码【C语言】
【ChaosBlade:节点 CPU 负载、节点网络延迟、节点网络丢包、节点域名访问异常】
Digital triangle model acwing 1027 Grid access
NCS Chengdu Xindian interview experience
【istio简介、架构、组件】
With an annual salary of 50W, Alibaba P8 will come out in person to teach you how to advance from testing
Enterprise manager cannot connect to the database instance
Database storage - table partition
go mod module declares its path as: gtihub. com/xxx-xx but was required as:xx-xx
Speaking of a software entrepreneurship project, is there anyone willing to invest?
[Nanjing University] - [software analysis] course learning notes (I) -introduction









