# /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<<!
open $hosts $port
type binary
user $user $pass
cd /upload
lcd $work_path
prompt
put $packname
close
bye
!
rm -f $packname
}linux 通过shell上传zip包到指定ftp
原创birdinroom 博主文章分类:Linux ©著作权
文章标签 ftp shell 上传 文章分类 运维
-
Linux目录结构
在Linux中一切皆文件,这些文件按照一定的规则存放在不同的目录当中。为了能够快速找到文件及以后的操作的规范性,我们必须记清楚Linux的目录结构。
目录 云计算 Linux centos 自动化运维
















