1,510 瀏覽數

Linux – df

#df 計算磁區 (partition) 所使用的容量

[root@benjr ~]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       9643660   6747080   2406700  74% /
/dev/sda1               101086     12776     83091  14% /boot
none                    127384         0    127384   0% /dev/shm

系統預設使用 Kilo bytes 為單位

[root@benjr ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      9.2G  6.5G  2.3G  74% /
/dev/sda1              99M   13M   82M  14% /boot
none                  125M     0  125M   0% /dev/shm

-h human 的參數為一般人容易讀的方式來顯示容量.

[root@benjr ~]# df -hk
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       9643660   6747080   2406700  74% /
/dev/sda1               101086     12776     83091  14% /boot
none                    127384         0    127384   0% /dev/shm
[root@benjr ~]# df -hm
Filesystem           1M-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                          9418      6589      2351  74% /
/dev/sda1                   99        13        82  14% /boot
none                       125         0       125   0% /dev/shm

-k kilo bytes
-m mega bytes

發表迴響