星期三, 7月 28, 2010
超過磁碟配額限制使用者名單
script 原始來源:http://home.csjh.tcc.edu.tw/home_exceed.htm
下載 quota_exceed.zip
unzip -d /root quota_exceed.zip
rm -rf quota_exceed.zip
chmod 755 -R /root/quota_exceed
修改:
vi /root/quota_exceed/home_create
#!/bin/bash
# Create Quota_exceed report for /home partiotn (/dev/sdb2)
cd /root/quota_exceed
/usr/sbin/repquota /home | grep + | sort > home_exceed
cat r1 > /var/www/html/home_exceed.htm
export LANG=zh_TW.Big5
date +%F%t%A%t%T >> /var/www/html/home_exceed.htm
cat r2 >> /var/www/html/home_exceed.htm
awk -f r3.awk home_exceed >> /var/www/html/home_exceed.htm
cat r4 >> /var/www/html/home_exceed.htm
/root/quota_exceed/home_create
echo '0 */6 * * * root /root/quota_exceed/home_create' >> /etc/crontab
(來源:台北縣實踐國小)
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言