return to PRS Technologies website


du.sh
################################################################################ # # Module: du.sh # Author: Peter R. Schmidt # Description: Display and sum total size of selected files # # Change Log # # Date Name Description................. # 02/18/98 Peter R. Schmidt Start Program # ################################################################################ ls -ls $* | egrep -v "^total" | sort -n | awk ' { bytes=$6 table=$10 meg=bytes/1048576 tbytes += bytes printf "%14.0f bytes, %10.1f Meg %s\n",bytes,meg,table } END { print "-----------------------------------------------------" tmeg=tbytes/1048576 printf "%14.0f bytes, %10.1f Meg Total\n",tbytes,tmeg } ' ###############################################################################