I want to check used space for each and every partition in Linux. I am using this command to get size of each partition but not able to get used space or free space.
$ cat /proc/partitions
major minor #blocks name
8 0 16777216 sda
8 1 512000 sda1
8 2 16264192 sda2
253 0 14585856 dm-0
253 1 1675264 dm-1
I am able to get used space using df command, but it shows filesystems and it's not able to get used space for all the partitions like /dev/sda2.
$ df -Tl
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup-lv_root
ext4 14225776 3791704 9704780 29% /
tmpfs tmpfs 961596 72 961524 1% /dev/shm
/dev/sda1 ext4 487652 40187 421865 9% /boot
I want to calculate disk utilization. Is there any way to get used space and total space for each and every partition?