如何计算文件夹,其子文件夹和all中的所有文件.该计数不应包括文件夹计数 [英] How to count all files inside a folder, its subfolder and all . The count should not include folder count

查看:110
本文介绍了如何计算文件夹,其子文件夹和all中的所有文件.该计数不应包括文件夹计数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何计算文件夹,其子文件夹和all中的所有文件.该计数不应包含文件夹计数.

How to count all files inside a folder, its subfolder and all . The count should not include folder count.

我想在MAC中做

推荐答案

find . -type f | wc -l将递归列出当前目录中的所有文件(-type f仅限于文件)(将.替换为路径).它的输出通过管道传送到wc -l中,该行将计算行数.

find . -type f | wc -l will recursively list all the files (-type f restricts to only files) in the current directory (replace . with your path). The output of this is piped into wc -l which will count the number of lines.

这篇关于如何计算文件夹,其子文件夹和all中的所有文件.该计数不应包括文件夹计数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆