Introduction to FTP

xiaoxiao2021-03-06  81

technical manual

FTP Introduction 1. FTP Overview Although Telnet provides an excellent method for accessing the remote file, however, it is more convenient to use the files in your computer. If the user wants to use files on other computers, the most ideal way is to put it COPY to your computer to operate on your local computer. So what method uses to get the files in the remote computer? FTP is the tool to complete this work. FTP is named by the protocol it uses: File Transfer Protocol. As its name is indicated: The task of the protocol is to transfer files from a computer to another computer, which is related to the location, contacting method of the two computers, and the operating system used. Suppose the two computers can talk to the FTP protocol, and can access the Internet, you can use the FTP software command to transfer files. There may be some subtle differences for different operating systems, but their basic command structure is the same. FTP is a very useful tool that you can find anything you want in any public valid online database or document that can be accessed by FTP. There are now more than 1,000 (96 years of data), the FTP file server is used for all Internet users, and the user can transfer the files you need by using a computer connected to the Internet. FTP uses the "client / server" mode, the user is to install the FTP client on your local computer. The FTP client has two types of character boundaries and graphical interfaces (such as Cute FTP). First we will study how to transfer files between two computers on the character interface (registration name and password), follow we will discuss "anonymous ftp", it is a special service, allowing users to do without an account , Access public FTP database. Most public databases provide an anonymous FTP path, which means that users can get a lot of free files even without registration names. Second, how to connect first, we will consider send files between two computers in an existing account. When the user runs the FTP client on the local computer, like Telnet, the FTP needs to specify a computer that will exchange files, which can be done by the following command: C: / Windows / FTP Remote Host Name Remote Host to connect to the user This starts the FTP program and connects to the remote host of this name. When some systems cannot handle some domain name addresses, IP addresses of the remote host can be used, such as 202.38.184.82. Remote computers can be any host on the Internet, regardless of its operating system for UXIN, NT, Macintosh, or a DOS system. When FTP works with the remote computer, you request to enter the registration name and password. The following is a connection example: c: / windows / ftp noya.bupt.edu.cn220 Noya FTP Srver (Unix System V Release 4.0) Ready.Name NOYA: MZW): MZW Password: 230 User MZW Logged In. FTP> If the remote host is a system such as DOS and Macintosh, FTP may only type registration name because there is no password security on such operating systems. On these computers, avoid unnecessary access, usually processed by the service software of the suspension of FTP. If you are entering from the Name cursor, FTP will send your registration name you use in your local system. In the above example, the name and missing registration name of the local system are displayed in parentheses (NOYA: MZW). As a shortcut, you can type the carriage return to replace the full name. Like local registration, the registration name you use determines which remote files you can access. Keep in mind that you have to use the registration name and password of the login remote system. After you accept your registration name and password, you can start transfer files at any time.

FTP Displays the FTP> prompt prompts you further command. Third, FTP main feature 1. Transfer a single file FTP to transfer files in both directions. It can take a file on the local computer to send it to the remote computer, or take a file on a remote computer on a local computer. This can be implemented by the GET, PUT command. The GET command GET is to get the files on the remote host to use the following format: ftp> Get Source file target file source file is the name of the file on the remote computer of the user, the target file is the name of the user to create locally. . The target file name is arbitrary, if not omitted, the name of COPY will homologize the name. In the following example, we get the help.txt file from Noya.bupt.edu.cn with GUEST to get the help.txt file from Noya.bupt.edu.cn: C: / Windows / FTP Noya. bupt.edu.cnconnected to noya.user: guest 331 password:.... 230 User guest logged in ftp> get help.txt 200 PORT commadn successful 150 ASCII data connection for comments 226 ASCII Transfer complete 1634 bytes recevied in 0.052 seconds ( 30kbytes / s) ftp> quit221 goodbye. Put command PUT is on the remote host, the format is the same as the format of the get command: FTP> PUT source file target file 2. Multi-file transfer We previously discussed the get And the put command can only transfer one file at a time. Sometimes, if you want to transfer multiple files at a time, you can use the MPUT, MGET command to be implemented. The format is as follows: FTP> MPUT file name list FTP> MGET file name list 3. Directory in FTP in FTP, two sets of directories involved: your local directory and remote computer directory, change the directory on the remote host to use the following command : Ftp> CD directory Name This command works as the usual shell's CD command, is different from it is only valid on the remote computer. These can be summarized as follows: If there is no specified directory, the LCD lets you return to the lack of directory you registered. If this directory is started in / start, moving to the specified directory regardless of your current location (absolute position). If the directory is .., it will move the first level at the current directory. If the directory begins with the alphabetic character, it treats this directory as the current subdirector. When you cannot determine the current directory, you can use the PWD command to view your location. The rule of the FTP> PWD LCD command is the same as UNIX's CD command, but it changes the directory of the local computer. Fourth, the ftp command summary

ASCII enters the ASCII mode to transfer text files. Binary enters the binary to transmit binary files. The CD directory name changes the working directory of the remote computer. Close ends FTP and the session of the remote computer, and returns the FTP command status. After running the Close command, the user can connect with a new system or exit from the FTP. The DELETE file name deletes the file that specifies the name in the remote system. DIR directory or file lists all directories or files on the remote computer. Hash When a data block is transmitted with a GET or PUT command, the FTP displays a #. Useful when the user does not know if the network is working. This gives you a visible to determine the data transmitted in the transmission. When transmitting a large file, if the FTP has shown this information, it means that the transmission is being processed. The Hash command is a Boolean variable command that opens the display # switch with the hash command, and then shuts down with the Hash command. The HELP command displays a partitioning of this command. The LCD directory will miss the catalog to the specified directory on the local computer. Ls list a short directory on the remote computer, the parameters are the same as DIR. The MGET file list gets multiple files from the remote computer. The list of files can be a file name separated by spaces. Or often with any files that express any file and express anything on this location? Match type structure. The MPUT file list transmits multiple files to the remote computer. Open is connected to the specified computer, if you transfer the file from a system, you want to connect to a new system, it is useful. You must first turn off the original connection. PROMPT When using MGET or MPUT, the PROMPUT command allows FTP to prompt you before transferring each file. This prevents override existing documents. When prompted when the promp command is sent, the FTP will turn off the prompt, and when all files are transmitted, there is no question. The PWD displays the name of the remote current directory. LCD displays the current directory of the local computer. Quit Close all the currently open connections and exit FTP. User sends the username to the remote computer to log in, and this command can be used when the user name and password are not correctly entered. It can close the current connection without closing. ! In the UNIX system, when the FTP is run, the FTP can be exited, running directly! The UXIN command is typed. Ctrl C interrupt the FTP command. 5. Five, anonymous FTP so far, we discussed to transfer files between computers with existing accounts, users must send files to register and passwords on this computer, which will be the user and remote host management personnel Trouble, anonymous ftp (anonymous ftp) can exceed this limit. It allows users who have no registration names and passwords to access certain files on the computer with an Anonymous or FTP user, of course, will have a lot limit. Anonymous users typically obtain files, unable to create new files or modify existing files on remote computers, and have strict restrictions on files that can be copy. And Anonymous cannot access all hosts on the Internet, only hosts that provide this service. When an anonymous FTP starts, there is a special registration name called Anonymous or FTP. If FTP is turned on, connect to a remote computer and use anonymous or ftp as a registered name, FTP accepts any string to make a password. But generally requiring the address of the email as a password so that the administrator of such a service knows who is using the files specially licensed by the anonymous FTP user. Many FTP documents are informally informal by school or company, when the user logs in, they will ask the user to limit the number of access to the data or limit the time of accessing the data daily. These will be displayed when you first enter, please follow these regulations to avoid unnecessary trouble. After logging in to an anonymous FTP server, you can use the CD and DIR commands multiple times to view the information information available.

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

New Post(0)