Archive

Posts Tagged ‘磁盘容量’

df查看磁盘目录容量

August 2nd, 2012 No comments

[[email protected] ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/xvda1 20641404 5488500 14104380 29% /
tmpfs 250236 0 250236 0% /dev/shm

[[email protected] ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 20G 5.3G 14G 29% /
tmpfs 245M 0 245M 0% /dev/shm
[[email protected] ~]# df -aT
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/xvda1 ext4 20641404 5488500 14104380 29% /
proc proc 0 0 0 – /proc
sysfs sysfs 0 0 0 – /sys
devpts devpts 0 0 0 – /dev/pts
tmpfs tmpfs 250236 0 250236 0% /dev/shm
none xenfs 0 0 0 – /proc/xen
none binfmt_misc 0 0 0 – /proc/sys/fs/binfmt_misc

[[email protected] ~]# df -h /dev/xvda1
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 20G 5.3G 14G 29% /
[[email protected] ~]# df -ih
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/xvda1 1.3M 143K 1.2M 12% /
tmpfs 62K 1 62K 1% /dev/shm

 df [-ahikHTm] [目录或文件名]
选项与参数:
-a  :列出所有的文件系统,包括系统特有的 /proc 等文件系统;
-k  :以 KBytes 的容量显示各文件系统;
-m  :以 MBytes 的容量显示各文件系统;
-h  :以人们较易阅读的 GBytes, MBytes, KBytes 等格式自行显示;
-H  :以 M=1000K 取代 M=1024K 的进位方式;
-T  :连同该 partition 的 filesystem 名称 (例如 ext3) 也列出;
-i  :不用硬盘容量,而以 inode 的数量来显示
Categories: linux基础 Tags: , ,