Linux统计文件数目

统计当前目录下文件数目

$ find . -type f | wc -l

统计文件行数

$ wc -l  filename

仅统计内容为pattern的行(只有pattern)

$ grep -w "pattern" -c filename

仅统计内容不为pattern的行

$ grep -w "pattern" -c -v filename
原文地址:https://www.cnblogs.com/zhonghuasong/p/7461702.html