当前位置:网站首页>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
边栏推荐
- Greenplum6.x常用语句
- Lenovo hybrid cloud Lenovo xcloud: 4 major product lines +it service portal
- 最长上升子序列模型 AcWing 1017. 怪盗基德的滑翔翼
- Redis fault handling "can't save in background: fork: cannot allocate memory“
- NCS Chengdu Xindian interview experience
- 求有符号数的原码、反码和补码【C语言】
- Shell script for changing the current folder and the file date under the folder
- Required String parameter ‘XXX‘ is not present
- 阿里p8手把手教你,自动化测试应该如何实现多线程?赶紧码住
- Data analysis methodology and previous experience summary 2 [notes dry goods]
猜你喜欢
![Other 7 features of TCP [sliding window mechanism ▲]](/img/ff/c3f52a7b89804acfd0c4f3b78bc4a0.jpg)
Other 7 features of TCP [sliding window mechanism ▲]

Mountaineering team (DFS)

ncs成都新电面试经验

Output a spiral matrix C language

ESP32-ULP协处理器低功耗模式RTC GPIO中断唤醒

About using CDN based on Kangle and EP panel

Greenplum6.x重新初始化

Oracle makes it clear at one time that a field with multiple separators will be split into multiple rows, and then multiple rows and columns. Multiple separators will be split into multiple rows, and

let const

【MySQL】数据库进阶之触发器内容详解
随机推荐
How to add a mask of a target in a picture
数据分片介绍
Unity shader beginner's Essentials (I) -- basic lighting notes
Greenplum 6.x common statements
Digital triangle model acwing 1027 Grid access
Digital triangle model acwing 275 Pass a note
Mountaineering team (DFS)
对API接口或H5接口做签名认证
个人力扣题目分类记录
Greenplum6.x重新初始化
Isomorphic C language
指针进阶,字符串函数
Test pits - what test points should be paid attention to when adding fields to existing interfaces (or database tables)?
模拟卷Leetcode【普通】1706. 球会落何处
硬件大熊原创合集(2022/05更新)
Quick sorting (detailed illustration of single way, double way, three way)
实现自定义内存分配器
Greenplum 6.x build_ Environment configuration
年薪50w阿里P8亲自下场,教你如何从测试进阶
NCS Chengdu New Electric interview Experience