FTP non-interactive mode file transfer under NT and UNIX

Source: Internet
Author: User
Tags command line ftp ftp commands join lowercase file transfer protocol

FTP (Transfer Protocol) is a file transfer protocol through which you can transfer or transfer from a computer to a computer file. FTP commands can be used interactively or in a noninteractive manner. The use of interactive mode is simpler, the system will be prompt when the command executes, the implementation of non-interactive method is complicated, but it is very convenient for users, because FTP will automatically complete all operations. We use FTP command, in order to operate conveniently, often will be used in non-interactive way, in WindowsNT3. 51 and SCOUNIX3. 0 under the FTP implementation of non-interactive mode of processing is not the same, the following author on the separate introduction.

Whether in WindowsNT3. 51 or under a UNIX system, the FTP command can only run after the TCP/IP protocol is installed. For information on how to install the TCP/IP protocol on both systems, refer to its system manual, which is not explained here. FTP command execution process is generally divided into the following steps, the first is to set the join, the connection is to connect with the remote host, after the join, the user began to register, users register to check their password, after registering successfully, users can access the remote host.

First, in the WindowsNT3. Use FTP in 51 environments.

Under WindowsNT, the FTP command format is:

Ftp[-v][-d][-i][-n][-g][-s:filename][host]

All except the last parameter must be lowercase, meaning:

-V does not display the remote server response.

-N Disables automatic logon when the initial connection occurs.

-I closes the interaction prompt when multiple file transfers.

-D enables debugging, displaying all commands between the client and the server.

-G does not allow the use of the filename wildcard, which refers to allowing matching characters to be used in local files and path names.

-S:FILENAME specifies a text file that contains FTP commands, which are automatically run after FTP is started, and there are no spaces in the parameter. Use this switch to override redirection.

host specifies the hostname or IP address of the remote host to which you want to connect. If you want to specify a host, you must be the last parameter in the command line.

If you want to transfer files in a non-interactive manner, you can edit a text file ftp using text editing software. TXT, the content is the first remote host user name, followed by the user's password, and then some FTP commands, note that all FTP commands are lowercase, otherwise ftp is considered invalid command, for example:

LZF (user name for remote host)

lzf12345 (password for remote host user)

Binary (in two way, the characters from other systems can be transmitted as is)

Hash (Prints a "#" character whenever 512 bytes of data is transmitted.) This command is useful when transferring large files or having a slow connection, which allows users to understand how things are progressing.

GETPROFILEAAAA (fetch file.) Profile, and renamed to AAAA)

Bell (Bell)

Close (disconnect)

Bye (exit FTP command)

Run the ftp-s:ftp at the command prompt. Txtdzserver "command can automatically implement file transfer, where FTP. TXT file must be in the current directory or the file with the full pathname, dzserver as the host name of the remote host, of course, can also write dzserver as an IP address, such as "ftp-s:ftp." TXT200. 28. 1. 1 ".

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.