[CentOS] df to get total disk usage on all filesystems?

MHR mhullrich at gmail.com
Thu Aug 14 08:12:58 UTC 2008


On Wed, Aug 13, 2008 at 8:56 PM, Lunix1618 <lunix1618 at gmail.com> wrote:
>
> Hi,
>
> This is work well on my laptop that running Fedora 9 with no LVM but on CentOS 5.2 with LVM it cann't calculate the LVM volume, below is output of my system :
>
> [root at centos-svr ~]# df -kPl
> Filesystem         1024-blocks      Used Available Capacity Mounted on
> /dev/mapper/VolGroup00-LogVol00 274405432  18584656 241656808       8% /
> /dev/sda2               101105     19096     76788      20% /boot
> tmpfs                  1682508         0   1682508       0% /dev/shm
>
> and with the command of Stephen :
> [root at centos-svr ~]# df -Pkl | awk '/^\/dev\// { avail += $3/1024 } END { printf("%d Mb used\n",avail)} '
> 18173 Mb used
>

Well, I get 18167, but that's not too far off.

mhr



More information about the CentOS mailing list