ftp客户端发起对ftp服务器_ftp登陆命令

ftp客户端发起对ftp服务器_ftp登陆命令FTP是一个C/S类型的软件,连接服务端需要FTP客户端才能完成,常见的FTP客户端有以下几种:浏览器:可以通过浏览器中输入ftp://ip或者ftp://域名的方式3分钟了解计算机发展历史-组团学来访问FTP自带客户端:命令行下可以使用ftp命令去连接三方客户端:FileZilla8uftp图形软件或者文本界面的lftp等三种方式中,文本界面是比较麻烦的,无法鼠标流。所以我重点给大家讲解一…

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全家桶1年46,售后保障稳定

FTP是一个C/S类型的软件,连接服务端需要FTP客户端才能完成,常见的FTP客户端有以下几种:

浏览器:可以通过浏览器中输入 ftp://ip或者ftp://域名的方式3分钟了解计算机发展历史-组团学来访问FTP

自带客户端:命令行下可以使用ftp命令去连接

三方客户端:FileZilla 8uftp 图形软件或者文本界面的lftp等

三种方式中,文本界面是比较麻烦的,无法鼠标流。所以我重点给大家讲解一下

1)文本界面登陆

文本界面匿名登陆

[root@localhost ~]# ftp 192.168.11.16

Connected to 192.168.11.16 (192.168.11.16).

220 (vsFTPd 3.0.3)

Name (192.168.11.16:root): ftp #用户名可以是ftp也可以是anonymous

331 Please specify the password.

Password: #密码为空

230 Login successful. #显示登陆成功

Remote system type is UNIX.

Using binary mode to transfer files.

ftp> ls

227 Entering Passive Mode (192,168,11,16,90,35).

150 Here comes the directory listing.

drwxr-xr-x    2 0        0               6 May 14  2019 pub

226 Directory send OK.

通过ls可以列出当前目录下有哪些内容 看到有一个目录叫pub

ftp> pwd

257 “/”

通过pwd命令查看当前路径  注意这里显示的是FTP的根目录

ftp> bye

221 Goodbye.

退出使用bye命令

文本界面本地用户登录

[root@localhost ~]# ftp 192.168.11.16

Connected to 192.168.11.16 (192.168.11.16).

220 (vsFTPd 3.0.3)

Name (192.168.11.16:root): hello

331 Please specify the password.

Password:

230 Login successful.

Remote system type is UNIX.

Using binary mode to transfer files.

ftp> ls

227 Entering Passive Mode (192,168,11,16,130,240).

150 Here comes the directory listing.

drwxr-xr-x    2 1001     1001            6 Jan 15 08:56 下载

drwxr-xr-x    2 1001     1001            6 Jan 15 08:56 公共

drwxr-xr-x    2 1001     1001            6 Jan 15 08:56 图片

drwxr-xr-x    2 1001     1001            6 Jan 15 08:56 文档

drwxr-xr-x    2 1001     1001            6 Jan 15 08:56 桌面

drwxr-xr-x    2 1001     1001            6 Jan 15 08:56 模板

drwxr-xr-x    2 1001     1001            6 Jan 15 08:56 视频

drwxr-xr-x    2 1001     1001            6 Jan 15 08:56 音乐

226 Directory send OK.

ftp> pwd

257 “/home/hello” is the current directory

2)FTP客户端常用命令

键入help命令可以查看所有可使用的命令

ftp> help

Commands may be abbreviated.  Commands are:

!                debug         mdir           sendport     site

$                dir           mget           put          size

account          disconnect    mkdir          pwd          status

append           exit          mls            quit         struct

ascii            form          mode           quote        system

bell             get           modtime        recv         sunique

binary           glob          mput           reget        tenex

bye              hash          newer          rstatus      tick

case             help          nmap           rhelp        trace

cd               idle          nlist          rename       type

cdup             image         ntrans         reset        user

chmod            lcd           open           restart      umask

close            ls            prompt         rmdir        verbose

cr               macdef        passive        runique        ?

delete           mdelete       proxy          send

!+linux命令   执行系统命令

!ls /opt  显示linux系统中/opt目录下的内容

ftp> !ls /opt

dhcp  dns  rh

lcd linux系统中的当前目录

lcd /root  将linux系统中的当前目录切换到/root下

ftp> lcd /root

Local directory now /root

put 上传命令,mput批量上传命令

上传initial-setup-ks.cfg文件到hello家目录下

ftp> put initial-setup-ks.cfg

local: initial-setup-ks.cfg remote: initial-setup-ks.cfg

227 Entering Passive Mode (192,168,11,16,96,132).

150 Ok to send data.

226 Transfer complete.

1803 bytes sent in 0.00135 secs (1333.58 Kbytes/sec)

可以看到上传成功了

验证一下上传结果

ftp> ls

227 Entering Passive Mode (192,168,11,16,173,142).

150 Here comes the directory listing.

-rw-r–r–    1 1000     1000         1803 Feb 26 07:01 initial-setup-ks.cfg

drwxr-xr-x    2 1000     1000            6 Jan 11 01:37 下载

drwxr-xr-x    2 1000     1000            6 Jan 11 01:37 公共

drwxr-xr-x    2 1000     1000            6 Jan 11 01:37 图片

drwxr-xr-x    2 1000     1000            6 Jan 11 01:37 文档

drwxr-xr-x    2 1000     1000            6 Jan 11 01:37 桌面

drwxr-xr-x    2 1000     1000            6 Jan 11 01:37 模板

drwxr-xr-x    2 1000     1000            6 Jan 11 01:37 视频

drwxr-xr-x    2 1000     1000            6 Jan 11 01:37 音乐

226 Directory send OK.

看见了吧

切换linux当前目录到/tmp

ftp> lcd /tmp

Local directory now /tmp

get下载命令,mget批量下载

下载initial-setup-ks.cfg到linux系统当前目录/tmp

ftp> get initial-setup-ks.cfg

local: initial-setup-ks.cfg remote: initial-setup-ks.cfg

227 Entering Passive Mode (192,168,11,16,229,134).

150 Opening BINARY mode data connection for initial-setup-ks.cfg (1803 bytes).

226 Transfer complete.

1803 bytes received in 2.9e-05 secs (62172.41 Kbytes/sec)

列出linux目录/tmp的内容,看到了下载的文件initial-setup-ks.cfg

ftp> !ls /tmp/

dhcp                                          tracker-extract-files.0

initial-setup-ks.cfg                                  VMwareDnD

systemd-private-8e7a99ea89c14ab396d66116970fe04d-chronyd.service-sghHHs       vmware-root

systemd-private-8e7a99ea89c14ab396d66116970fe04d-colord.service-wK7h08      yum_save_tx.2019-02-20.16-10.Z6uXqR.yumtx

systemd-private-8e7a99ea89c14ab396d66116970fe04d-cups.service-cokBro          yum_save_tx.2019-02-21.09-03.08zIbU.yumtx

systemd-private-8e7a99ea89c14ab396d66116970fe04d-rtkit-daemon.service-6wt1S0  yum_save_tx.2019-02-22.11-10.prawAT.yumtx

ftp> close

221 Goodbye.

ftp> ls

Not connected.

可以使用close断开连接,当连接断开希望再次连接直接使用open命令即可

ftp> open 192.168.11.16

Connected to 192.168.11.16 (192.168.11.16).

220 (vsFTPd 3.0.2)

Name (192.168.11.16:root): hello

331 Please specify the password.

Password:

230 Login successful.

Remote system type is UNIX.

Using binary mode to transfer files.

ftp> ls

227 Entering Passive Mode (192,168,11,16,192,88).

150 Here comes the directory listing.

-rw-r–r–    1 1000     1000         1803 Feb 26 07:01 initial-setup-ks.cfg

drwxr-xr-x    2 1000     1000            6 Jan 11 01:37 下载

drwxr-xr-x    2 1000     1000            6 Jan 11 01:37 公共

drwxr-xr-x    2 1000     1000            6 Jan 11 01:37 图片

drwxr-xr-x    2 1000     1000            6 Jan 11 01:37 文档

drwxr-xr-x    2 1000     1000            6 Jan 11 01:37 桌面

drwxr-xr-x    2 1000     1000            6 Jan 11 01:37 模板

drwxr-xr-x    2 1000     1000            6 Jan 11 01:37 视频

drwxr-xr-x    2 1000     1000            6 Jan 11 01:37 音乐

226 Directory send OK.

delete命令可以删除属于自己的文件

删除initial-setup-ks.cfg文件

ftp> delete initial-setup-ks.cfg

250 Delete operation successful.

ftp> ls

227 Entering Passive Mode (192,168,11,16,168,142).

150 Here comes the directory listing.

drwxr-xr-x    2 1000     1000            6 Jan 11 01:37 下载

drwxr-xr-x    2 1000     1000            6 Jan 11 01:37 公共

drwxr-xr-x    2 1000     1000            6 Jan 11 01:37 图片

drwxr-xr-x    2 1000     1000            6 Jan 11 01:37 文档

drwxr-xr-x    2 1000     1000            6 Jan 11 01:37 桌面

drwxr-xr-x    2 1000     1000            6 Jan 11 01:37 模板

drwxr-xr-x    2 1000     1000            6 Jan 11 01:37 视频

drwxr-xr-x    2 1000     1000            6 Jan 11 01:37 音乐

226 Directory send OK.

总结

都有哪些方法可以连接ftp服务器

文本方式如何连接

在文本界面中有哪些操作

重点:如何使用ftp命令在文本界面下连接ftp服务器

难点:区分清楚何时操作的是ftp服务器的内容,何时操作的是本地的内容

版权申明:本站文章均来自网络,如有侵权,请联系01056159998 邮箱:itboby@foxmail.com

特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/179393.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • STM32 + UCOSII 操作系统(简单讲解)「建议收藏」

    STM32 + UCOSII 操作系统(简单讲解)「建议收藏」前言这是我将UCOSII操作系统移植在STM32单片机上后进行UCOSII操作系统学习的一些笔记与理解,此文最后会附上我自己在UCOSII操作系统下使用STM32写的ESP8266+onenet+http协议的程序链接,可以作为参考,如果文中有不当的地方,还请各位大佬加以中指正,我一定会虚心求教。参考资料:正点原子RTOS操作系统讲解,参考的文章:(53条消息)STM32学习笔记一一UCOSII(1)_霁风AI-CSDN博客_ucosii1.UCOSII操作系统的简介前台后台系统相信大家都

    2022年6月4日
    36
  • Intellij idea创建springboot项目时报错Artifact contains illegal characters

    Intellij idea创建springboot项目时报错Artifact contains illegal characters

    2021年5月16日
    181
  • postman调用rpc接口_postman测试本地接口

    postman调用rpc接口_postman测试本地接口一般使用的接口类型都是http协议传输,第一次遇到RPC类型,使用postman进行测试。请求方式get或者post并不影响,URL是在域名后面加了/rpc,例如,https://www.baidu.com/rpcheaders:写了常规请求时的内容(头为空也不影响)body选择raw,{“jsonrpc”:“2.0”,“method”:“eth_getBalance”,“para…

    2022年10月10日
    3
  • pycharm虚拟环境与本地环境区别_python如何激活虚拟环境

    pycharm虚拟环境与本地环境区别_python如何激活虚拟环境    Python的版本众多,在加上适用不同版本的PythonPackage。这导致在同时进行几个项目时,对库的依赖存在很大的问题。这个时候就牵涉到对Python以及依赖库的版本管理,方便进行开发,virtualenv就是用来解决这个问题的。下面介绍使用PyCharm创建VirtualEnvironment的方法。    PyCharm可以使用virtualenv中的功能来创建虚拟环境。Py…

    2022年8月25日
    9
  • top命令查看内存信息_ubuntu查看cpu信息

    top命令查看内存信息_ubuntu查看cpu信息top命令是Linux下常用的性能分析工具,能够实时显示系统中各个进程的资源占用状况,类似于Windows的任务管理器。top显示系统当前的进程和其他状况,是一个动态显示过程,即可以通过用户按键来不断刷新当前状态.如果在前台执行该命令,它将独占前台,直到用户终止该程序为止.比较准确的说,top命令提供了实时的对系统处理器的状态监视.它将显示系统中CPU最“敏感”的任务列表.该命令可以按CPU使…

    2022年9月24日
    5
  • 计算机网络面试题总结

    计算机网络面试题总结一OSI与TCP/IP各层的结构与功能,都有哪些协议五层协议的体系结构1应用层域名系统HTTP协议2运输层运输层主要使用以下两种协议UDP的主要特点TCP的主要特点3网络层4数据链路层5物理层总结一下二TCP三次握手和四次挥手(面试常客)为什么要三次握手为什么要传回SYN传了SYN,为啥还要传ACK为什么要四次挥手…

    2022年5月11日
    40

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号