1、统计指定文件的总行数 find . "(" -name "*.java" ")" -print | xargs wc -l 2、统计所有文件的行数 git ls-files | xargs cat | wc -l