标签:
TIME=`date +%Y%m%d` ls -l | sed 1d | awk '{print $3"\t"$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\n", $1, $3, $4, $5, $2}}' | sort -k 2rn > HD.info.$TIME.txt rm hdtmp1 hdtmp2放到一个脚本里面可以直接运行~
标签:
原文地址:http://blog.csdn.net/skenoy/article/details/44079347