#cat ftp.script
Open IP
User Yourname Passwd
LCD / Home
Put hi.txt
#cat
ftp.script | ftp -n
In this way, we can write a script that can log in to the FTP server timing, and upload the file on the FTP server.
You can also realize timing remote backup data
#cat backup.sh
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#! / bin / sh
Date = `DATE % T-% M-% D-% h`
TAR CZVF $ DATE.TAR.GZ FILES
Cat
ftp.script | ftp -n
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------