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

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

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

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

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

posted @ 2021-06-08 15:26  Coding&Fun  阅读(96)  评论(0编辑  收藏  举报