Reduce read/write stress on harddrive for temporary application data.
減少應用程式在硬存上的讀寫
/tmp to RAM tmpfs (auto reszie below 1GB)把
/tmp 掛載到 RAM 並設成 1GB 大小.$ nano -w /etc/fstab
none /tmp tmpfs defaults,nosuid,nodev,noatime,size=1024M,mode=1777 0 0Edit
/etc/bash/bashrc修改
/etc/bash/bashrc$ nano -w /etc/bash/bashrc
if [ ! -d /tmp/.$USER ]; then
mkdir /tmp/.$USER
fi
for x in .adobe .dia .gimp-2.3 .gqview .java .macromedia .mplayer .thumbnails .urlgfe .vlc .xvpics
do
if [ ! -d /tmp/.$USER/$x ]; then
mkdir /tmp/.$USER/$x
ln -sf /tmp/.$USER/$x $HOME
fi
done
No comments:
Post a Comment