统计指定文件的文件个数,使用find 命令

find / -type f |wc -l

详解:find 命令 -type f 查找文件类型为f正规文件的