¿ù°£ Àα⠰Խù°

°Ô½Ã¹° 56°Ç
   
bigsize_file_upload.sh
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2016-07-07 (¸ñ) 18:34 Á¶È¸ : 2894
±ÛÁÖ¼Ò :
                          

# cat bigsize_file_upload.sh
#!/bin/bash
path=/mnt
host=`hostname`
num=0
loop_num=0
file_max=2
file_size=1
loop=3

ftp_host="xxxxxx"
ftp_id="xxxxxx"
ftp_pw="xxxxxx"

mkdir $path/$host
### file make
while [ $num -lt $file_max ]
    do  
    num=`expr $num + 1`
    fallocate -l ${file_size}G $path/$host/$num.img
done

### ftp upload
while [ $loop_num -lt $loop ]
    do
    loop_num=`expr $loop_num + 1`
    lftp -e "mirror -R  $path/$host $host; rm -r $host; bye" -u ${ftp_id},${ftp_pw} ${ftp_host}
    echo "loop count : $loop_num"
done

echo "ftp upload end"


À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

 



 
»çÀÌÆ®¸í : ¸ðÁö¸®³× | ´ëÇ¥ : ÀÌ°æÇö | °³ÀÎÄ¿¹Â´ÏƼ : ·©Å°´åÄÄ ¿î¿µÃ¼Á¦(OS) | °æ±âµµ ¼º³²½Ã ºÐ´ç±¸ | ÀüÀÚ¿ìÆí : mojily°ñ¹ðÀÌchonnom.com Copyright ¨Ï www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.