我可以显示目录的内容使用了多少磁盘空间,不包括其子目录(及其内容)吗?如果是这样,请问是什么命令?谢谢。
Eri*_*lho 18
摘录du --help:
-h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)
-S, --separate-dirs do not include size of subdirectories
-s, --summarize display only a total for each argument
Run Code Online (Sandbox Code Playgroud)
跑步:
du -Shs /path/to/dir
Run Code Online (Sandbox Code Playgroud)
应该给你你想要的。