Use FTP to automatically transfer file-Linux Enterprise Application-Linux server application information. The following is a detailed description.
I. How to use ftp to automatically transfer files in Windows
1. Create a local file first. The file name can be any name, for example, ftp.txt. Its content is as follows:
Open 192.168.1.100/* remote server address or name */
MYNAME/* username MYNAME */
MYPASSWORD/* User Password MYPASSWORD */
Binary/* transfers files in binary format. Optional */
Cd REMOTE_PATHNAME/* enter the remote target path REMOTE_PATHNAME */
Get REMOTE_FILE LOCAL_FILE/* download the remote file REMOTE_FILE to the local file LOCAL_FILE */
Put LOCAL_FILE REMOTE_FILE/* upload the local file LOCAL_FILE to a remote file REMOTE_FILE */
Bye/* exit the ftp application */
2. Run the following command:
Ftp? S: ftp.txt
The automatic transfer is completed.
Ii. using ftp to automatically transfer file names in UNIX is a static method
1. Create a local file. For example, if the file name is ftp.txt, its content is as follows:
Open 192.168.1.100/* use open to connect to the remote server 192.168.1.100 */
User myname mypassword/* MYNAME is the user name and MYPASSWORD is the password */
Binary/* transmitted in binary format */
Hash/* when data is transferred, # is displayed */
Cd REMOTE_PATHNAME/* enter the remote target path REMOTE_PATHNAME */
Get REMOTE_FILE LOCAL_FILE/* download the remote file REMOTE_FILE to the local file LOCAL_FILE */
Put LOCAL_FILE REMOTE_FILE/* upload the local file LOCAL_FILE to a remote file REMOTE_FILE */
Bye/* exit the ftp application */
2. Run the following command:
Cat ftp.txt | ftp-n
Iii. using ftp to automatically transfer file names in UNIX is a dynamic method.
It is described as a file with the month and date as variables.
1. Create the script file autoftp. sh.