本篇文章为大家展示了Shell中怎么上传zip压缩文件到FTP服务器,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。
代码如下:
# /bin/bash # creator:lihuibin # date : 2014-03-10 16:45 # desc : upload file to ftp 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<上述内容就是Shell中怎么上传zip压缩文件到FTP服务器,你们学到知识或技能了吗?如果还想学到更多技能或者丰富自己的知识储备,欢迎关注创新互联行业资讯频道。
文章名称:Shell中怎么上传zip压缩文件到FTP服务器-创新互联
文章转载:http://whjierui.cn/article/shssd.html