Ftp client Programming

Source: Internet
Author: User
Tags ftp commands ftp client

About the Ftp protocol;
Ftp command;
Ftp return value;
Ftp programming structure;
About the Ftp protocol:
I would like to know about the Ftp protocol, so I will not explain it. The following is an introduction to RPC959:
The objectives of FTP are 1) to promote sharing of files (computer
Programs and/or data), 2) to encourage indirect or implicit (
Programs) use of remote computers, 3) to shield a user from
Variations in file storage systems among hosts, and 4) to transfer
Data reliably and efficiently. FTP, though usable directly by a user
At a terminal, is designed mainly for use by programs.
Ftp command:
Many people may have used Ftp commands, but many people may have made the same mistake and mistakenly recognized Ftp commands. I used to append Ftp in win2000 console, and then enter the Ftp prompt. Then I used many commands with the "windows" character, such as "dir" and "cd ", I thought I had mastered the Ftp command. I am very confident to open the programming tool, write a socket, and then connect to the ftp server. Of course, the server returns a message indicating that the connection is successful. I started to send some commands that I used just now. Most of the information returned is "500 'xx': command not understood ".
Finally, I sent the help command, and I was amazed at the returned results. Most of the commands in it were never used. These are the real Ftp commands. In Windows, only Ftp client tools are used. The commands in Windows are not Ftp commands. The Ftp client commands and Ftp commands in windows are also mixed in many documents on the Internet. For real Ftp commands, see the instructions in RFC959 (in fact, some Ftp tools such as CuteFtp also display commands ). Frequently Used Commands include:
ABOR: Abort;
CWD directory name: change the existing Directory;
CDUP: return to the parent directory;
REIN: reinitialize the server status;
QUIT: exit;
PORT: Set the data transmission PORT;
PASV: Passive Mode
Type a/I: transmission mode;
Mode s/B/C: Transmission MODE ?;
RETR file name: Download file;
STOR file name: upload a file;
APPEND the local file to the server;
RNFR: modify the original file name (change the previous file name)
RNTO: the modified file name;
DELE file name: delete the file;
RMD directory folder: delete a folder;
MKD Directory: create a directory;
PWD current working directory;
LIST: LIST the projects in the directory;
SYST: View server operating system information;
STAT to view the Ftp parameter status;

Related Article

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.