#!/bin/sh # Disk usage of the filesystem holding a directory DIR="/var" df -P --block-size=1000000 "$DIR" | LC_ALL=C awk 'NR==2 {printf "%.0f GB of %.0f GB (%s)\n", $3/1000, $2/1000, $5}'