|
|
|
¸®´ª½ºÆÁ Go Unix Power Tools Online Book
Go Bash Guide
|
|
Read No. 200 article |
2005-09-22 09:46:06 |
|
|
|
|
NickName |
Ç®ºñ´© |
Subject |
loop device mount |
|
|
# /dev/tmp loop ÆÄƼ¼Ç »ý¼º [512¸Þ°¡]
dd if=/dev/zero of=/dev/tmp bs=1024 count=512000
mke2fs -jFq /dev/tmp
[ ! -d /tmp/ ] && mkdir /tmp/
mount -o loop,noexec,nosuid,rw /dev/tmp/ /tmp/
chmod 1777 /tmp/
# tmp ÆÄƼ¼Ç »ý¼º ¿¹Á¦ /backup/tmpmount 128¸Þ°¡
if (( $(mount |grep -c /tmp) == 0 )) ; then
[ ! -f /backup/tmpmount ] && dd if=/dev/zero of=/backup/tmpmount bs=1024 count=128000 \
&& mke2fs -jFq /backup/tmpmount
[ -f /backup/tmpmount ] && rm -rf /tmp/* && mount -o loop,noexec,nosuid,rw \
/backup/tmpmount /tmp/ && chmod 1777 /tmp/
fi
|
|
Page Loading [ 0.02 Sec ]
SQL Time [ 0 Sec ]
|
|
|