今天写了一个批处理脚本,将tmp目录扩展到2G
注:
sed -i -e 's/512000/2048000/g' /scripts/securetmp
注意脚本中的这句,这里面的2048000代表我们要扩展后的大小,单位是KB
tmp目录一般和内存同大小即可,不超过8GB大小,推荐2G,4G
代码 复制 - 运行
#!/bin/bash
# This script is FREE and written by
訪客無法瀏覽此圖片或連結,請先 註冊 或 登入會員 。
/etc/init.d/chkservd stop
/etc/init.d/mysql stop
umount /var/tmp
umount /tmp
sed -i -e 's/512000/2048000/g' /scripts/securetmp
rm /usr/tmpDSK
/scripts/securetmp --auto
cd /tmp
ln -s /var/lib/mysql/mysql.sock
/etc/init.d/mysql start
/etc/init.d/chkservd start
df -lh
echo '';
echo '';
echo '';
echo "=======Technical support: QQ:200513538 ======= ";
echo '';
echo 'http://www.diledns.com';
echo '';
echo '';