Monday, 10 September 2012

HPUX: Report Disk space in MB or GB of a file system

MB

#!/usr/bin/ksh

echo "Filesystem Mbytes used avail %used Mounted on"

bdf $1 | grep -v Filesystem | awk '{ printf("%s %10d %10d %10d %4s %s\n",$1,$2/
1024,$3/1024,$4/1024,$5,$6)}'


for GB

#!/usr/bin/ksh

echo "Filesystem Gbytes used avail %used Mounted on"

bdf $1 | grep -v Filesystem | awk '{ printf("%s %10d %10d %10d %4s %s\n",$1,$2/
1024,$3/1024,$4/1024/1024,$5,$6)}'

No comments:

Post a Comment

Tweets by @sriramperumalla