3 # tbdf (total bdf 'cause it shows the total K bytes used)
5 # written by Tom Bukowski 1990,1991
6 # tbdf version 2.2 Jan 4, 1993
7 # @(#) tbdf version 3.0 Aug 19, 1996
12 command=`mount|cut -d' ' -f1-4|grep -v ':'| cut -d' ' -f1`
14 elif [ $1 = 'help' -o $1 = 'HELP' ];then
16 echo "Usage: $0 [-r][-rv] [pattern]"
18 echo ' -r <pattern> total all filesystems beginning with
20 echo ' -rv <pattern> total all filesystems excluding pattern\n'
24 elif [ $1 != "-r" -a $1 != "-rv" ];then
27 elif [ $1 = "-r" -o $1 = "-rv" ];then
29 test $1 = '-rv' && opt='-v'
35 egrepCmd="$egrepCmd|^$1"
41 awk '{printf"%s %s %s\n",$1,$2,$3 }' |\
44 egrep $opt $egrepCmd |\
46 test -z "$command" && exit
50 if [ -x /usr/bin/nawk ];then
73 END { printf"%43s\n","------ ------ ------"
74 printf"%27d %7d %7d\n",Kbytes_total,Used_total,Avail_total