free disk space for lvm volumes using df ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

via script I like to know how much free disk space is on each partition in my system.
This works well with normal partitions.

df /partition | grep ^/ | tr -s [:blank:] " "  | cut -d " " -f4

But on LVM volumes the output of "df" is totally different.
The name of a volume and the size are in different lines.
I have a mixture of normal partitions and LVM. That makes it more difficult.

/dev/mapper/VolGroup00-root.fs
                      4983392   1395340   3330824  30% /
/dev/hda1               101086     10052     85815  11% /boot
/dev/shm                257280         0    257280   0% /dev/shm
/dev/mapper/VolGroup00-home.fs
                     16854376     77892  15906496   1% /home



Has anybody an idea for that ?


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux