dir () {

dir=$1

[ -d $dir ] || mkdir $dir

num=(`/usr/bin/du $dir -sk|awk '{print $1}'|sed 's/[A-Z]//'`)

m=$(echo "scale=3;$num/1024"|bc|awk '{printf "%.3f", $0}')

echo $m 

}

dir $1