banner
NEWS LETTER

使用wc工具统计代码行数

Scroll down

1. 统计当前目录下,php 文件数量:

1
find . -name "*.php" |wc -l

2. 统计当前目录下,所有 php 文件行数:

1
find . -name "*.php" |xargs cat|wc -l

3. 统计当前目录下,所有 php 文件行数,并过滤空行:

1
find . -name "*.php" |xargs cat|grep -v ^$|wc -l

来自:https://learnku.com/articles/21338

其他文章
请输入关键词进行搜索