首页 > df命令中 / 目录的容量是不是真实容量?

df命令中 / 目录的容量是不是真实容量?

假设/与/home这两个目录在不同的分区上.第一次df显示:

[root@www ~]# df
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/sda2       10079084 4049392   5517692  43% /
tmpfs             361652     228    361424   1% /dev/shm
/dev/sda1          99150   28262     65768  31% /boot
/dev/sda3        5039616  156596   4627020   4% /home

然后我在/home中写一些东西,再次df:

[root@www ~]# df
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/sda2       10079084 4127892   5439192  44% /
tmpfs             361652     228    361424   1% /dev/shm
/dev/sda1          99150   28262     65768  31% /boot
/dev/sda3        5039616  235208   4548408   5% /home

可以看到/所在文件系统使用率也增加了,但我并没有在其所在分区写入任何文件.所以我认为这里显示的/的使用率是整个linux目录树的使用率.也就是说,尽管/使用率到了100%,但其所在的文件系统实际上并没有被填满.是这样吗?为什么要这样?


「所以我认为这里显示的/的使用率是整个linux目录树的使用率」这是不对的

// 所在的文件系统(磁盘分区)的使用率,而不是所有的。即 / 的 Used 是不包含 /home 的 Used 的,它们是独立计算的。

【热门文章】
【热门文章】