Ubuntu 查看当前目录使用的总空间大小

查看当前目录使用的总空间大小

du -h --max-depth=0 
#du -h --max-depth=0
217M	.

查看当前目录使用总空间的大小以及当前目录下一级文件及文件夹各自使用的总空间大小

du -h --max-depth=1
#du -h --max-depth=1
 22M	./plugin
 70M	./tmp
 92M	.

查看具体的文件或者文件夹

du -h --max-depth=1 文件/文件夹
# du -h --max-depth=1 ./tmp
69M	./tmp
# du -h --max-depth=1 201804171542184943.jpg 
352K	201804171542184943.jpg
原文地址:https://www.cnblogs.com/jiqing9006/p/8867184.html