1.ftp自动上传文件脚本 #!/bin/bash ftp -n<<! open 192.168.220.129 user ls toor binary hash cd /path/to/backup lcd /path/to/need/backup prompt mkdir `date +"%Y%m%d"` cd `date +"%Y%m%d"` mput * close bye ! open行--要备份到的主机IP user行--ls为要备份到的主机
网络通信协议分层 应用层: HTTP(Hypertext Transfer Protocol 超文本传输协议,显示网页) DNS(Domain Name System) FTP(File Transfer Protocol) SFTP(SSH File Transfer Protocol,和FTP不一样) SCP(Secure copy,based on SSH) SSH (Secure Shell) 通信层: TCP(Transmission Control Protocol 三次握手传输协议