Concept and Common commands of FTP Server (1)

Source: Internet
Author: User
Tags ftp commands ftp client file transfer protocol ftp protocol

Speaking of networks, we have to mention servers. Among the servers, FTP servers are the most common ones. Then we will discuss the relevant knowledge. First, let's understand the basic concepts of the FTP protocol, and then parse its Common commands. Of course, these are all related to the FTP server.

I. FTP Overview

FTP is short for the File Transfer Protocol File Transfer Protocal), mainly to complete File Transfer with remote computers. FTP adopts the Client/Server mode and establishes a connection between the client and the server using TCP. The client can download files from the server or upload local files to the server. The FTP server can be anonymous or authorized. Anonymous FTP servers are open to the public. Users can use "ftp" or "anonymous" as accounts and use the email address as the password to log on to the server; the authorized FTP server must use the authorized account name and password to log on to the server. Generally, anonymous users have low permissions and can only download files, but cannot upload files. A client can access an FTP server by using FTP commands or by using FTP client software.

Ii. Use of common FTP commands

From "START" → "Program" → "attachment" → "command prompt", Open the DOS command window and you can enter the FTP command.

1. log on to the FTP server

Method 1: Enter the ftp host

The host is the domain name or IP address of the FTP server. For example:

C: \> ftp ftp.bttc.cn

After FTP is started, the command prompt changes to ftp>

Method 2: first enter the command ftp to start FTP, and then use the command open host to log on to the server. For example:

C: \> ftp

C: \> open ftp.bttc.cn

When logging on, the system first displays some welcome information, and then requires the user name and password, such as anonymous login server:

C: \> ftp ftp.bttc.cn

............

User: anonymous

331 User name okay, please send complete E-mail address as password

Password:

230 User logged in, proceed

Ftp>

Note: When you enter the password, the screen is not displayed, but you have already entered the password. do not consider it an error. After successful logon, you can access the files on the FTP server.

If logon fails due to incorrect user name or password, you can use the user command to log on again.

2. view files on the FTP server

Dir command: displays the Directory and file list.

Ls command: display the simple file list.

Cd command: Enter the specified directory.

The dir command can use wildcards "*" and "?". For example, to display all files with the jpg extension in the current directory, run the command dir *. jpg.

The directory name must be included in the cd command. For example, cd main indicates entering the main sub-directory under the current directory, and cd... indicates returning the sub-directory of the previous level.

3. Download an object

Audio or images, videos, audios, and other files should be transmitted in binary mode. By default, FTP is an ASCII code transmission method.

Type COMMAND: view the current transmission mode.

Ascii command: Set the transmission mode to ASCII code.

Binary command: Set the transmission mode to binary.


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.