【OS_Linux】统计目录下文件的个数

1、统计目录下文件的个数(不统计子目录)

当前目录:ls -l | grep "^-" | wc -l

任意目录:find dir  -type  f | wc -l(dir指定对应的目录)

参考文章:https://www.linuxprobe.com/linux-ls-grep-wc.html

原文地址:https://www.cnblogs.com/leiblog/p/14862988.html