Linux 按扩展名统计文件数量
find . -type f | sed -n 's/..*\.//p' | sort | uniq -c
本文介绍了一种在Linux系统中按文件扩展名统计文件数量的方法,通过find、sed、sort、uniq和wc命令的组合使用,可以快速获取系统中各种文件类型的分布情况。
Linux 按扩展名统计文件数量
find . -type f | sed -n 's/..*\.//p' | sort | uniq -c
1万+