#!/bin/ksh # Determine how many bytes occupy a given account typeset -i size=0 typeset -i totalsize=0 savepwd=$PWD cd ~ # go to home directory cd rossde.com # go to base of Web site ls -lR > ${savepwd}/listall cd $savepwd #return to operating directory while read junk1 junk2 junk3 junk4 size junkrest; do # size is 5th item if [[ $size != 0 ]]; then let totalsize=$totalsize+$size fi let size=0 done < listall \rm listall print 'Total size=' $totalsize