FTP自动登录批量下载文件
从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自动登录批量上传文件
从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