如何找到占用我存储空间的内容?

如何找到占用我存储空间的内容?

我的服务器有问题。磁盘已满,但我找不到哪个目录是负责的:

/dev/sda1        97G   91G  1.9G  98% /
udev            3.9G  4.0K  3.9G   1% /dev
tmpfs           798M  500K  798M   1% /run
none            4.0K     0  4.0K   0% /sys/fs/cgroup
none            5.0M     0  5.0M   0% /run/lock
none            3.9G     0  3.9G   0% /run/shm
none            100M     0  100M   0% /run/user

如果我尝试显示目录​​大小:

    # du -sh /*
    9.6M    /bin
21M /boot
    4.0K    /dev
    11M /etc
    44K /home
    30M /lib
    4.0K    /lib64
    16K /lost+found
    8.0K    /media
    4.0K    /mnt
    47M /opt
    du: cannot access ‘/proc/23534/task/23534/fd/4’: No such file or directory
    du: cannot access ‘/proc/23534/task/23534/fdinfo/4’: No such file or directory
    du: cannot access ‘/proc/23534/fd/4’: No such file or directory
    du: cannot access ‘/proc/23534/fdinfo/4’: No such file or directory
    0   /proc
    479M    /root
    500K    /run
    24M /sbin
    12K /srv
    du: cannot access ‘/sys/kernel/slab/L2TP/IPv6’: No such file or directory
    du: cannot access ‘/sys/kernel/slab/L2TP/IP’: No such file or directory
    0   /sys
    24K /tmp
    1.2G    /usr
    11G /var

我应该有一个100G的磁盘。但是用du命令,好像我的目录还不到20G

# df -i
Filesystem      Inodes  IUsed   IFree IUse% Mounted on
/dev/sda1      6405600 154536 6251064    3% /
udev           1020715   1447 1019268    1% /dev
tmpfs          1021286    878 1020408    1% /run
none           1021286      2 1021284    1% /sys/fs/cgroup
none           1021286      1 1021285    1% /run/lock
none           1021286      1 1021285    1% /run/shm
none           1021286      2 1021284    1% /run/user

相关内容