How to use ftp common commands

ftp is a common command on the network, but when using this command, you must interactively enter the user name and password according to the prompts, which is very inconvenient for the automatic execution or batch processing of the program. The following provides two methods for specifying the username and password when logging in via ftp:

1. Use the command ftp://username:password@hostname:port

ftp://username:password@host address:port number

   This usage can only be used in the browser, not the command line.

2. You can use configuration files on the command line to solve this problem:

   Format: ftp -s:[configuration file] [ftp address]
   Example: ftp -s:e:/test_ftp.txt 192.1.101.203
   The file content of test_ftp.txt is:
   username
   pwd

Of course, other ftp commands can also be added to the configuration file to realize the automatic execution of ftp. The test was successful, take a small note.
————————————————
Copyright statement: This article is an original article of CSDN blogger "Haoyue Ru me", following the CC 4.0 BY-SA copyright agreement, please attach the original source link and this statement.
Original link: https://blog.csdn.net/fm0517/article/details/4280162

Guess you like

Origin blog.csdn.net/jonepjxh/article/details/118104957