#!/bin/sh
if [ $# != 2 ]
then
echo "usage: ftp-put.sh binary 192.192.4.101"
exit
fi
ftp -n<<! # -n: 不受.netrc文件的影响,<< : 使用即时文件重定向输入
open $2 # para2 : 192.192.4.101
user root root # usrid, password
binary
cd /usr/application # remote dir
lcd ./ # local dir
prompt
put $1 $1
close
bye
! # ! : 即时文件的标志他必须成对出现,以标识即时文件的开始和结尾
如对本文有疑问,
点击进行留言回复!!
相关文章:
-
Linux cut 命令详解
cut 命令在linux和unix中的作用是从文件中的每一行中截取出一些部分,并输出到标准输出中。我们可以使用 cut 命令从一行字符串中于以字节,字符,字段(...
[阅读全文]
-
-
-
-
为Nginx动态添加模块的方法
写在前面很多时候,我们根据当时的项目情况和业务需求安装完nginx后,后续随着业务的发展,往往会给安装好的nginx添加其他的功能模块。在为nginx添加功能模...
[阅读全文]
-
-
-
-
-
UOS arm换源
清华源mv/etc/apt/sources.list /etc/apt/sources.list.bak备份原始...
[阅读全文]
-
网友评论