Liunx查看当前目录下文件夹的大小

经常会碰到磁盘满了的情况,这个时候就需要看一下是哪个文件夹出的问题

可以使用如下命令:

sudo du -h --max-depth=1 /var

下面就是相应的output:

77G /var/lib
24K /var/db
4.0K /var/empty
4.0K /var/local
4.0K /var/opt
196K /var/spool
4.0K /var/games
3.3G /var/log
5.0G /var/cache
28K /var/tmp
85G /var
85G total

 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.