find . -name '*.h' | xargs wc -l 把 '*.h' 换成 '*.m' 就可以统计后缀名为.m的文件的行数啦 转载于:https://www.cnblogs.com/vagrantatbeijing/p/3436302.html