|
|
|
¸®´ª½ºÆÁ Go Unix Power Tools Online Book
Go Bash Guide
|
|
Read No. 151 article |
2002-05-09 14:08:31 |
|
|
|
|
|
|
·çÆ® µð·ºÅ丮¿¡ common µð·ºÅ丮°¡ ÀÖ´Ù°í °¡Á¤ÇÏ°í ±× ¾È¿¡ °ø°³ ÀÚ·á°¡
ÀÖ´Ù°í °¡Á¤.
mount --bind ¿É¼ÇÀ» »ç¿ëÇϹǷÎ, Ä¿³ÎÀÌ 2.4.x ÀÌ»óÀ϶§ °¡´É
¾Æ·¡ µÎ°³ÀÇ ½ºÅ©¸³À» Å©·Ð ÀÛ¾÷À¸·Î Àû´çÈ÷ ÀÛ¾÷À» °É¾îÁÖ¸é µÈ´Ù
¿¹·Î 00½Ã ºÎÅÍ 08½Ã ±îÁö °ø°³ ÀÚ·á½ÇÀ» ¿î¿µÇÏ°í ½ÍÀ»¶§
¸¶¿îÆ® ½ºÅ©¸³À» 00½Ã¿¡ Å©·ÐÀÛ¾÷À» °É°í
¾ð¸¶¿îÆ® ½ºÅ©¸³À» 08½Ã¿¡ Å©·ÐÀÛ¾÷À» °É¸é µÈ´Ù
¾Æ·¡´Â ½ºÅ©¸³
°èÁ¤³» common µð·ºÅ丮 »ý¼º ¹× ¸¶¿îÆ® ½ºÅ©¸³Æ®
----------------------------------------------------------
#!/bin/bash
## common µð·ºÅ丮 »ý¼º ¹× ¸¶¿îÆ®
for home in $(ls -l / |grep ^d|grep "home"|awk '{print $9}');do
for comm in $(ls -l /$home|grep ^d|awk '{print $9}'); do
if [ ! -d /$home/$comm/common ] ; then
mkdir /$home/$comm/common
fi
chmod 777 /$home/$comm/common
mount --bind /common /$home/$comm/common
done
done
¾ð¸¶¿îÆ® ¹× °èÁ¤³» common µð·ºÅ丮 »èÁ¦ ½ºÅ©¸³Æ®
----------------------------------------------------------
#!/bin/bash
## ftp process ´ÝÀ½
kill -9 $(ftpwho|grep "proftpd:"|awk '{print $1}')
## umount ÀÛ¾÷
for home in $(ls -l / |grep ^d|grep "home"|awk '{print $9}');do
for comm in $(ls -l /$home|grep ^d|awk '{print $9}'); do
if [ -d /$home/$comm/common ] ; then
umount /$home/$comm/common
fi
if [ ! -f /$home/$comm/common/* ] ; then
rm -rf /$home/$comm/common
fi
done
done
|
|
Page Loading [ 0.02 Sec ]
SQL Time [ 0 Sec ]
|
|
|