如何使用 du 命令获取根内容和嵌套内容以获得相同的总值?

如何使用 du 命令获取根内容和嵌套内容以获得相同的总值?

关于du带有选项的命令-sch

如果执行du -sch spring-security出现:

103M    spring-security
103M    total

但是出现了if isexecute du -sch spring-security/*(见底部)

12K     spring-security/CONTRIBUTING.adoc
12K     spring-security/LICENSE.txt
4.0K    spring-security/README.adoc
8.0K    spring-security/RELEASE.adoc
705K    spring-security/acl
17K     spring-security/aspects
1.0K    spring-security/bom
8.0K    spring-security/build.gradle
2.6M    spring-security/buildSrc
269K    spring-security/cas
4.0K    spring-security/class_mapping_from_2.0.x.txt
11M     spring-security/config
3.1M    spring-security/core
473K    spring-security/crypto
13K     spring-security/data
4.0K    spring-security/dependencies
4.6M    spring-security/docs
1.2M    spring-security/etc
61K     spring-security/gradle
1.0K    spring-security/gradle.properties
8.0K    spring-security/gradlew
4.0K    spring-security/gradlew.bat
304K    spring-security/itest
661K    spring-security/ldap
1.0K    spring-security/local-antora-playbook.yml
265K    spring-security/messaging
4.0K    spring-security/notice.txt
4.7M    spring-security/oauth2
125K    spring-security/openid
93K     spring-security/remoting
268K    spring-security/rsocket
1.2M    spring-security/saml2
4.0K    spring-security/scripts
4.0K    spring-security/settings.gradle
137K    spring-security/taglibs
731K    spring-security/test
4.2M    spring-security/web
36M     total

令人困惑的是:

  • 为什么第二个命令执行时出现36M,而不是再次出现103M?

我尝试了以防万一,du -ch --max-depth=15 spring-security/*但再次出现 36M

如何获得第一个场景与第二个场景相同的总数?

相关内容