狮子的雄心,骆驼的耐力,孩子的执著!
分类: Python/Ruby
2012-09-14 15:17:08
#!/bin/sh
FTPHOST="localhost"
USERNAME="user"
PASSWORD="123456"
LOCALDIR=”/opt/ftp/”
#本机储存上传文件的目录
LOCAL_FILE="/$LOCALDIR/$1"
# FTP上传后存储的路径
FTP_FILE="/aaa/$1"
#登入FTP Server
ftp -n $FTPHOST <
user $USERNAME $PASSWORD
bin
put $LOCAL_FILE $ FTP_FILE
bye
!