!/bin/bash
CHECK_DIRECTORIES="/var/log /home"
DATE=DATE.rpt
echo "Top Ten Disk Space Usage"
echo "for $CHECK_DIRECTORIES Directories"
for DIR_CHECK in DIR_CHECK Directory:"
du -S D;=}'|sed 'N; s/\n/ /'|gawk '{printf 2 "\t" $3 "\n"}'
done
exit
CHECK_DIRECTORIES="/var/log /home"
DATE=DATE.rpt
echo "Top Ten Disk Space Usage"
echo "for $CHECK_DIRECTORIES Directories"
for DIR_CHECK in DIR_CHECK Directory:"
du -S D;=}'|sed 'N; s/\n/ /'|gawk '{printf 2 "\t" $3 "\n"}'
done
exit
本文标题:shell 统计磁盘使用前10的脚本
本文链接:https://www.haomeiwen.com/subject/tsyduqtx.html
网友评论