在 Ubuntu 中,此命令的输出
df --exclude={tmpfs,devtmpfs,squashfs,overlay} | sed -e /^Filesystem/d | awk '{print $6 " " $1 " " $3 " " $4 " " $5}'
Run Code Online (Sandbox Code Playgroud)
是:
/ /dev/mapper/dockerVG-rootLV 8110496 40591632 17%
/dockerssd /dev/mapper/ssdVG-ssdLV 214133656 274642488 44%
/dockerhdd /dev/mapper/hddVG-hddLV 83278236 1385191240 6%
/var/lib/docker /dev/mapper/hddVG-dockerLV 76046204 412729940 16%
Run Code Online (Sandbox Code Playgroud)
这就是我需要的。
在 CentOS 6 上我得到这个输出:
/dev/mapper/vg_rproxy-lv_root
51475068 43192316 12% /
/boot /dev/sda1 82688 379364 18%
/dev/mapper/vg_rproxy-lv_home
77349888 73119692 1% /home
Run Code Online (Sandbox Code Playgroud)
一团糟。
CentOS 6 的完整输出:
$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg_rproxy-lv_root …
Run Code Online (Sandbox Code Playgroud)