显示并统计目录(含子目录)中的所有文件扩展名

gen*_*sst 3 bash

我正在使用主题中的命令来查看目录和所有子目录中的所有文件扩展名。

find . -type f -name '*.*' | sed 's|.*\.||' | sort -u

如何统计每个分机的出现次数?

喜欢:

png: 140

Rob*_*sen 5

像这样,uniq-c, --count标志一起使用:

find . -type f -name '*.*' | sed 's|.*\.||' | sort | uniq -c
Run Code Online (Sandbox Code Playgroud)