FTP ¾÷·Îµå ½ºÅ©¸³Æ®ÀÔ´Ï´Ù.
- ÇÏÀ§ µð·ºÅ丮¸¦ Æ÷ÇÔÇؼ ¿Ã¸®¸ç ¿©·¯ ftp »çÀÌÆ®¿¡ ¼Ò½º¸¦ ¿Ã¸®´Â ¹æ¹ýÀÔ´Ï´Ù.
#!/bin/bash
NUM=76 # ½ÃÀÛ¾ÆÀÌÇÇ END_NUM=81 # ¸¶Áö¸· ¾ÆÀÌÇÇ NET=115.xx.xx
USER=xxxxxx PW=xxxxx path=/home/webhosting/web1_backup
echo "start " > /root/ip.log
### upload-list ¿¡´Â Æú´õ¸®½ºÆ® ÁöÁ¤
cat upload-list |while read a ; do if [ $NUM -ge $END_NUM ] ; then exit
else IP=$NET.$NUM cd $path/$a find -type d > directory.list # ÇÏÀ§µð·ºÅ丮 È®ÀÎ echo "$IP / $path/$a " >> /root/ip.log
### ftp ¾÷·Îµå for subdir in `cat directory.list` do ftp -n $IP << EOF open ${IP} user ${USER} ${PW} bi prom mkdir ${subdir} cd ${subdir} lcd ${subdir} mput *
EOF done
let NUM=$NUM+1 rm -f directory.list fi done
|