FTP自动登录批量下载文件
从ftp服务器192.168.1.171上的/home/data 到本地的/home/databackup
FTP自动登录批量上传文件
从ftp服务器192.168.1.171上的/home/data 到本地的/home/databackup
从ftp服务器192.168.1.171上的/home/data 到本地的/home/databackup
引用
!/bin/bash
ftp -v -n 192.168.1.171
user guest 123456
binary
cd /home/data
lcd /home/databackup
prompt
mget *
close
bye
ftp -v -n 192.168.1.171
user guest 123456
binary
cd /home/data
lcd /home/databackup
prompt
mget *
close
bye
FTP自动登录批量上传文件
从ftp服务器192.168.1.171上的/home/data 到本地的/home/databackup
引用
#!/bin/bash
ftp -v -n 192.168.1.171 << END
user guest 123456
binary
hash
cd /home/data
lcd /home/databackup
prompt
mput *
bye
END
ftp -v -n 192.168.1.171 << END
user guest 123456
binary
hash
cd /home/data
lcd /home/databackup
prompt
mput *
bye
END
原文地址:https://www.cnblogs.com/Leo_wl/p/2233198.html