TIME=`date +%Y%m%d`
ls -l | sed 1d | awk '{print $3" "$9}' | sort -k2 | grep -v hdtmp > hdtmp1
ls -l | sed 1d | awk '{print $9}' | xargs du -h --max-depth=0 --time | sort -k4 | grep -v hdtmp > hdtmp2
paste hdtmp1 hdtmp2 | awk '{if($3~/G|T/){printf "%15s %5s %s %s %s
", $1, $3, $4, $5, $2}}' | sort -k 2rn > HD.info.$TIME.txt
rm hdtmp1 hdtmp2
放到1个脚本里面可以直接运行~