B / Y / U / S
HOME À¥ È£½ºÆà µµ¸ÞÀÎ ¸Å´º¾ó °í°´Áö¿ø ¼³Á¤Á¤º¸ °èÁ¤½Åû 2024-12-28 Saturday 
À¥ È£½ºÆÃ
# °øÁö »çÇ×
# ÀÚÁÖ ¹¯´Â Áú¹®
# Áú¹®°ú ´äº¯
# °¡ÀÔ ¹®ÀÇ
Ä¿¹Â´ÏƼ
# ÀÚÀ¯°Ô½ÃÆÇ
# ¸®´ª½ºÆÁ
# ¾ÆÀÌÅ¥ Å×½ºÆ®
# ³»È¨ ¼Ò°³
# °Ö·¯¸®
# ÀÚ·á½Ç

  ¸®´ª½ºÆÁ  Go Unix Power Tools Online Book Go Bash Guide
Read No. 151 article 2002-05-09 14:08:31
NickName   Ç®ºñ´© [ȨÆäÀÌÁö]
Subject   °ø°³ ÀÚ·á½Ç ¿î¿µ Å©·Ð ½ºÅ©¸³Æ®
·çÆ® µð·ºÅ丮¿¡ 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
Regist Addr [ 210.221.19.151 ] ¸ñ·Ïº¸±â À­±Û ¾Æ·§±Û
Á¤±ÔÇ¥Çö½Ä [ »ó¼¼ °Ë»ö ]
Page Loading [ 0.02 Sec ] SQL Time [ 0 Sec ]

Copyleft 1999-2024 by JSBoard Open Project
Theme Designed by IDOO And follow GPL2

°³ÀÎÁ¤º¸ Ãë±Þ¹æħ ÀÌ¿ë ¾à°ü »çÀÌÆ® ¸Ê ¾îµå¹Î °ü¸®