马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的小伙伴们!#/bin/bash
#creator:lihuibin
#date:2014-03-1016:45
#desc:uploadfiletoftp
hosts="192.168.56.100"
port=21
user=test
pass=testpwd
work_path="/var/www/cms"
packname="publish"
#hosts=$1
#port=$2
#user=$3
#pass=$4
#packname=$6
#work_path=$5
cd$work_path
/usr/bin/zip-r$packname*
[-f"$work_path/$packname"]&&{
ftp-n<<!
open$hosts$port
typebinary
user$user$pass
<divclass="linenumber24index23alt1"style="box-sizing:content-box!important;border-bottom:0px;position:static!important;text-align:left;border-left:0px;padding-bottom:0px!important;text-transform:none;text-indent:0px;margin:0px;outline-style:none!important;outline-color:invert!important;min-height:inherit!important;padding-left:1em!important;outline-width:0px!important;width:auto!important;bottom:auto!important;padding-right:1em!important;font:12px/13.19pxConsolas,BitstreamVeraSansMono,CourierNew,Courier,monospace;white-space:nowrap;background:white;float:none!important;letter-spacing:normal;color:rgb(80,80,80);vertical-align:baseline!important;overflow:visible!important;border-top:0px;top:auto!important;right:auto!important;border-right:0px;word-spacing:0px;padding-top:0px!important;left:auto!important;border-top-left-radius:0px;border-bottom-left-radius:0px;border-bottom-right-radius:0px;-webkit-text-stroke-width:0px;border-top-right-radius:0px">cd |