LESSON 4 SERVICES AND CONNECTIONS part IV

来源:互联网 发布:淘宝店铺域名可以改吗 编辑:程序博客网 时间:2024/06/03 03:23

4.1.4 FTP
FTP stands for file transfer protocol. As the name implies, it allows for files to be transferred
between a local and a remote computer. While it can be used for private file transfers, it is
more commonly associated with free, anonymous ftp servers which offer public access to
collections of files.
Anonymous ftp was once the means by which most computer users exchanged files over the
Internet. While many anonymous ftp servers are used to distribute files that are available
illegally(and are possibly infected with viruses), there are also many which are legally used to
distribute programs and files. Servers which offer anonymous ftp services can be found
through various means, including Internet search engines.
Most anonymous ftp servers now allow you to access their files using the ftp protocol through
a web browser.

 

4.1.4  FTP

FTP 是文件传输协议的简写。如同字面解释一样,它用于本地电脑和远程电脑的文件传输。尽管它可以用于私人文件

传送,它更常用于公共获取文件的免费,匿名传输协议的服务器。

匿名传输协议曾经是电脑在网络上传输文件最常用的方式。尽管许多传输文件的匿名传输协议服务器不是合法的(可能

还带有病毒),这里也有许多合法的匿名传输文件服务器。提供匿名传输协议服务的服务器可以通过各种方法找到,其中

一种方法就是通过因特网搜索引擎。

许多匿名传输协议服务器允许通过网站浏览器使用文件传输协议来获取他们的文件。

 

Exercises:
Both Windows and Linux come with a basic, command line ftp client; to access it, open a
command prompt or terminal window and type:
ftp
At the ftp> prompt, you can type help, to get a list of available commands.
    ftp> help

Commands may be abbreviated. Commands are:
!             delete              literal           prompt           send
?            debug              ls                  put                 status
append  dir                    mdelete        pwd               trace
ascii       disconnect       mdir              quit                type

bell        get                   mget            quote              user
binary    glob                 mkdir            recv                verbose
bye        hash                mls               remotehelp
cd          help                 mput            rename
close     lcd                    open             rmdir

 

练习:

Windows和Linux系统都有一个基本的命令行的文件传输协议客户端,打开一个命令提示符,键入:

ftp

在ftp窗口中,你可以键入help,得到一列有用的命令。

 

Some important commands are:
       ftp> open <domain.name>
Which connects you to the ftp server named domain.name.
       ftp> ls
or
       ftp> dir

Which lists the contents of the remote working directory.
       ftp> cd <newdir>
Which changes the remote working directory to a directory named newdir.
       ftp> get <filename>
Which downloads a file named filename from the remote computer to the local computer.
       ftp> mget <file1> <file2> <file3>
Which downloads files named file1, file2, and file3 from the remote computer to the local
computer.
       ftp> close

Which disconnects you from the remote ftp server.

 

一些重要的命令是:

       ftp>open<域名>

该命令将你的电脑连接到指定的文件传输协议的服务器上。

       ftp>ls

或者

       ftp>dir

列出了远程工作文件夹的内容。

       ftp>cd<新的文件夹名>

改变远程工作文件夹的文件夹名。

       ftp>get<文件名>

从远程电脑上下载文件到本地电脑上。

       ftp>mget<文件1><文件2><文件3>

从远程电脑上下载文件1,2,3到本地电脑上。

       ftp>close

断开和远程文件传输协议服务器的连接。

       ftp> quit
Which shuts down your local ftp client.

To connect to an anonymous ftp service, you must first open your local ftp client:
        ftp
Use the open command to connect to the server. The command
         ftp> open <anon.server>
connects your ftp client with the anonymous ftp server named anon.server.

When the remote ftp server makes its connection, it will identify itself to your local client, then
ask for a user name.
         Connected to anon.server.
         220 ProFTPD Server (Welcome . . . )
         User (anon.server:(none)):

 

      ftp>quit

关闭本地文件传输协议客户端。

为了连接到一个匿名文件传输协议服务器,你需要首先打开本地文件传输客户端:

        ftp

用打开命令连接服务器。命令

        ftp>open<anon.server>

将你的文件传输协议客户端连接到名叫 anon.server的匿名文件传输协议服务器。

当远程文件传输协议服务器进行连接后,它会和你的本地客户端进行身份验证,请求一个用户名。

         连接到anon.server。

         220 ProFTPD 服务器(欢迎。。。)

         用户(anon.server:()):


For most anonymous ftp servers, you should enter in the word anonymous as the user name.
The remote ftp server will acknowledge that you are connecting as an anonymous user, and
will give you instructions on what to use as a password.
         331 Anonymous login ok, send your complete email address as your
         password.

         Password:
In most cases, the remote server does not check the validity of the email address entered as
a password, so it will not stop you from accessing the server if you enter an invalid address.
However, this is considered to be a breach of etiquette. After you have entered a password,
the remote server will send a welcome message to your local computer.
    230-
        Welcome to ftp.anon.server, the public ftp server of anon.server. We
        hope you find what you're looking for.
        If you have any problems or questions, please send email to
        ftpadmin@anon.server
        Thanks!
    230 Anonymous access granted, restrictions apply.

 

对大多数的匿名文件传输协议服务器来说,你应该输入假名作为用户名。远程文件传输协议服务器会

识别你正以匿名用户进行连接,然后告诉你如何设置密码。

       331 匿名成功登陆,发送你完整的电子邮件地址作为你的密码。

       密码:

在大多数情况下,远程服务器不会检查作为密码的电子邮件的正确性,所以如果你输入一个无效的地址,也

可以登录服务器。但是这被认为是一种失礼的行为。当你输入密码后,远程服务器将发送一个欢迎使用的信息

到你的电脑上。

    230-

       欢迎使用ftp.anon.server,anon.server的公共文件传输协议服务器。我们希望你找到你所需要的。

      如果有任何问题,发送邮件到ftpadmin@anon.server
      谢谢!

   230 匿名登录成功,限制适用。

 

From here, you can use the ls, dir, cd and get commands to download files from the remote
server to your local computer.
Using these examples, see if you can download a file from an anonymous ftp server. Use your
web browser and a search engine to find an anonymous ftp server which has a copy of Alice
in Wonderland, then, using the command line ftp client – not your web browser – try to
download the file.

 

在这里,你可以用ls,dir,cd和get命令从远程电脑上下载文件到你的电脑上。

使用这些例子,看你能否从一个匿名文件传输协议服务器上下载一个文件。用你的网页浏览器和搜索引擎查找一个

有《爱丽丝漫游奇境记》的匿名文件传输协议服务器,然后用命令行文件传输协议客户端-不是你的网站浏览器-

试着下载这些文件。

 

原创粉丝点击