#!/bin/sh # Created by Chifeng Qu # Mon Dec 29 12:02:14 CST 2008 # # xargs: A single arg was greater than the max arglist size of 2048 characters # usage() { echo "Usage: $0 Path" } if [ $# -eq 0 ];then usage exit fi find $1 -type f 2>/dev/null | xargs ls -l | awk '{(total+=$5)};END{print "Total(MB):" total/1048576 }'