FTP automatic landing script

xiaoxiao2021-03-06  65

#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

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

转载请注明原文地址:https://www.9cbs.com/read-89689.html

New Post(0)