chenkehao 发表于 2018-8-25 06:06:23

linux 通过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
页: [1]
查看完整版本: linux 通过shell上传zip包到指定ftp