当前位置:网站首页>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
边栏推荐
- What are the advantages of commas in conditional statements- What is the advantage of commas in a conditional statement?
- Golang etcdv3 reports an error. The attribute in grpc does not exist
- OpenGL frame buffer
- let const
- Simple use of Xray
- OpenGL三维图形绘制
- 【MySQL】数据库进阶之触发器内容详解
- Greenplum 6.x monitoring software setup
- 指针进阶,字符串函数
- Recommended by Alibaba P8, the test coverage tool - Jacobo is very practical
猜你喜欢

xray的简单使用

平台化,强链补链的一个支点

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

Nanjing commercial housing sales enabled electronic contracts, and Junzi sign assisted in the online signing and filing of housing transactions

opencv之图像分割

Greenplum6.x重新初始化

Greenplum6.x-版本变化记录-常用手册

Greenplum6.x搭建_环境配置
![[Yugong series] February 2022 U3D full stack class 007 - production and setting skybox resources](/img/e3/3703bdace2d0ca47c1a585562dc15e.jpg)
[Yugong series] February 2022 U3D full stack class 007 - production and setting skybox resources

Goldbach conjecture C language
随机推荐
个人力扣题目分类记录
A bug using module project in idea
实现自定义内存分配器
About using CDN based on Kangle and EP panel
Greenplum6.x监控软件搭建
Introduction to data fragmentation
Digital triangle model acwing 1027 Grid access
如何统计项目代码行数
[Yugong series] February 2022 U3D full stack class 006 unity toolbar
C language for calculating the product of two matrices
Isomorphic C language
[Yugong series] February 2022 U3D full stack class 005 unity engine view
How to add a mask of a target in a picture
Unityshader introduction essentials personal summary -- Basic chapter (I)
Gson converts the entity class to JSON times declare multiple JSON fields named
使用Typora编辑markdown上传CSDN时图片大小调整麻烦问题
阿里p8手把手教你,自动化测试应该如何实现多线程?赶紧码住
What are the advantages of commas in conditional statements- What is the advantage of commas in a conditional statement?
Greenplum 6.x reinitialization
leetcode135. Distribute candy