ftp客户端使用详细说明【linux和windows】,字节跳动上千道精选面试题还不刷起来

  • mput local-file:将多个文件传输至远程主机。

  • pwd:显示远程主机的当前工作目录。

  • rename[from][to]:更改远程主机文件名。

ftp使用实例

如果不熟悉上面的使用方法,可以把上面常用命令截图钉在屏幕上,边看命令变使用,效率更高哦。

在这里插入图片描述

直接登陆ftp
  • 说明见代码后面

[root@centos76_1 ~]# ftp 192.168.59.129

Connected to 192.168.59.129 (192.168.59.129).

220 Welcom to ccx_ftp.

Name (192.168.59.129:root): yb1 # 输入用户名

331 Please specify the password.

Password: #输入密码

230 Login successful. #提示230登陆成功

Remote system type is UNIX.

Using binary mode to transfer files.

进入ftp后登陆【常用于指定端口】
  • 说明见代码后面

[root@centos76_1 ~]# ftp # 输入ftp回车

ftp> open 192.168.59.129

Connected to 192.168.59.129 (192.168.59.129).

220 Welcom to ccx_ftp.

Name (192.168.59.129:root): yb1 #输入用户名

331 Please specify the password.

Password: #输入密码

230 Login successful. #登陆成功

Remote system type is UNIX.

Using binary mode to transfer files.

ftp> pwd

257 “/”

ftp> close # 断开链接

221 Goodbye.

ftp> open 192.168.59.129 21 #指定端口21

Connected to 192.168.59.129 (192.168.59.129).

220 Welcom to ccx_ftp.

Name (192.168.59.129:root): yb2 # 输入用户名

331 Please specify the password.

Password:#输入密码

230 Login successful.

Remote system type is UNIX. # 登陆成功

Using binary mode to transfer files.

ftp> pwd

257 “/”

ftp> bye # 退出ftp

221 Goodbye.

[root@centos76_1 ~]#

登陆后查看目录、切换目录、上传、下载、删除
  • 注:上传下载删除在服务端配置的时候需要给这个用户相应的权限,如果没有权限,报错如下所示

[root@centos76_1 ~]# ftp 192.168.59.129

Connected to 192.168.59.129 (192.168.59.129).

220 Welcom to ccx_ftp.

Name (192.168.59.129:root): yb1 #这个用户只有查看权限,没有其他任何权限

331 Please specify the password.

Password:

230 Login successful.

Remote system type is UNIX.

Using binary mode to transfer files.

ftp> put ip_tool.sh # 上传文件报错如下

local: ip_tool.sh remote: ip_tool.sh

227 Entering Passive Mode (192,168,59,129,88,57).

553 Could not create file.

ftp>

ftp> get share1 # 下载文件报错如下

local: share1 remote: share1

227 Entering Passive Mode (192,168,59,129,187,85).

150 Opening BINARY mode data connection for share1 (0 bytes).

226 Transfer complete.

ftp>

ftp> delete share1 # 删除文件报错如下

550 Delete operation failed.

  • 各个功能代码上面有介绍,下面记得看代码后面说明

[root@centos76_1 ~]# ftp 192.168.59.129 # 登陆

Connected to 192.168.59.129 (192.168.59.129).

220 Welcom to ccx_ftp.

Name (192.168.59.129:root): yb2 #这是一个满权限用户

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,59,129,140,86).

150 Here comes the directory listing.

-rw-r–r-- 1 0 0 0 May 07 03:25 noshare4

-rw-r–r-- 1 0 0 0 May 07 03:25 noshare5

drwxr-xr-x 2 1009 1009 6 May 08 03:09 新建文件夹

226 Directory send OK.

ftp> !pwd# 查看本地路径

/root

ftp> !ls #查看本地文件

anaconda-ks.cfg ccx initial-setup-ks.cfg ip_tool.sh share1 test1 公共 模板 视频 图片 文档 下载 音乐 桌面

ftp> lcd /var/ftp/ #切换本地目录

Local directory now /var/ftp

ftp> !ls #查看查看本地文件

file1 file2 file3 pub test4 test5 test6

ftp> ls # 查看远程文件

227 Entering Passive Mode (192,168,59,129,197,117).

150 Here comes the directory listing.

-rw-r–r-- 1 0 0 0 May 07 03:25 noshare4

-rw-r–r-- 1 0 0 0 May 07 03:25 noshare5

drwxr-xr-x 2 1009 1009 6 May 08 03:09 新建文件夹

226 Directory send OK.

ftp> cd /var/ftp # 切换远程路径

550 Failed to change directory. # 报错了,没有权限,配置的时候限制在家目录了

ftp> !ls

file1 file2 file3 pub test4 test5 test6

ftp> put test4 # 上传本地文件到远程

local: test4 remote: test4

227 Entering Passive Mode (192,168,59,129,211,170).

150 Ok to send data. #上传成功

226 Transfer complete.

ftp> put file1 #上传文件夹,报错,只能上传文件

local: file1 remote: file1

file1: not a plain file.

ftp> ls # 上传的test4文件已经有了

227 Entering Passive Mode (192,168,59,129,247,222).

150 Here comes the directory listing.

-rw-r–r-- 1 0 0 0 May 07 03:25 noshare4

-rw-r–r-- 1 0 0 0 May 07 03:25 noshare5

-rw-r–r-- 1 1009 1009 0 May 08 08:23 test4

drwxr-xr-x 2 1009 1009 6 May 08 03:09 新建文件夹

226 Directory send OK.

ftp> delete file1_new #删除一个文件夹,报错,为了安全,是不允许删除文件夹的

550 Delete operation failed.

ftp> delete test4 #删除test4这个文件

250 Delete operation successful.

ftp> ls #已经被删除

227 Entering Passive Mode (192,168,59,129,48,66).

150 Here comes the directory listing.

-rw-r–r-- 1 0 0 0 May 07 03:25 noshare4

-rw-r–r-- 1 0 0 0 May 07 03:25 noshare5

drwxr-xr-x 2 1009 1009 6 May 08 03:09 新建文件夹

226 Directory send OK.

ftp>

ftp> get noshare4 #下载远程文件到本地

local: noshare4 remote: noshare4

227 Entering Passive Mode (192,168,59,129,186,157).

150 Opening BINARY mode data connection for noshare4 (0 bytes).

226 Transfer complete.

ftp> !ls # 本地文件中已经有这个文件了

file1 file2 file3 noshare4 pub test4 test5 test6

ftp>

登陆后新建修改远程目录、下载上传多个文件

[root@centos76_1 ~]# ftp 192.168.59.129

Connected to 192.168.59.129 (192.168.59.129).

220 Welcom to ccx_ftp.

Name (192.168.59.129:root): yb2 #这是一个满权限用户

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,59,129,111,76).

150 Here comes the directory listing.

-rw-r–r-- 1 0 0 0 May 07 03:25 noshare4

-rw-r–r-- 1 0 0 0 May 07 03:25 noshare5

drwxr-xr-x 2 1009 1009 6 May 08 03:09 新建文件夹

226 Directory send OK.

ftp> mkdir file1 #创建一个文件夹file1

257 “/file1” created

ftp> ls #已经创建

227 Entering Passive Mode (192,168,59,129,72,222).

150 Here comes the directory listing.

drwxr-xr-x 2 1009 1009 6 May 08 08:54 file1

-rw-r–r-- 1 0 0 0 May 07 03:25 noshare4

-rw-r–r-- 1 0 0 0 May 07 03:25 noshare5

drwxr-xr-x 2 1009 1009 6 May 08 03:09 新建文件夹

226 Directory send OK.

ftp> rename file1 file1_new #重命名文件夹

350 Ready for RNTO.

250 Rename successful.

ftp> ls #已经重命名

227 Entering Passive Mode (192,168,59,129,213,198).

150 Here comes the directory listing.

drwxr-xr-x 2 1009 1009 6 May 08 08:54 file1_new

-rw-r–r-- 1 0 0 0 May 07 03:25 noshare4

-rw-r–r-- 1 0 0 0 May 07 03:25 noshare5

drwxr-xr-x 2 1009 1009 6 May 08 03:09 新建文件夹

226 Directory send OK.

ftp> cd file1_new #进入刚创建的文件夹

250 Directory successfully changed.

ftp> ls #里面没内容

227 Entering Passive Mode (192,168,59,129,107,143).

150 Here comes the directory listing.

226 Directory send OK.

ftp> cd …# 返回上一级

250 Directory successfully changed.

ftp> ls

227 Entering Passive Mode (192,168,59,129,88,133).

150 Here comes the directory listing.

drwxr-xr-x 2 1009 1009 6 May 08 08:54 file1_new

-rw-r–r-- 1 0 0 0 May 07 03:25 noshare4

-rw-r–r-- 1 0 0 0 May 07 03:25 noshare5

drwxr-xr-x 2 1009 1009 6 May 08 03:09 新建文件夹

226 Directory send OK.

ftp> lcd /var/ftp #切换本地目录

Local directory now /var/ftp

ftp> !ls #本地文件

file1 file2 file3 noshare4 pub test4 test5 test6

ftp> mput test4 test5 test6 #上传多个文件

mput test4? y # 输入y确定

227 Entering Passive Mode (192,168,59,129,42,244).

150 Ok to send data.

226 Transfer complete.

mput test5? y# 输入y确定

227 Entering Passive Mode (192,168,59,129,89,31).

150 Ok to send data.

226 Transfer complete.

mput test6? y# 输入y确定

227 Entering Passive Mode (192,168,59,129,45,21).

150 Ok to send data.

226 Transfer complete.

ftp> ls # 已经上传

227 Entering Passive Mode (192,168,59,129,187,200).

150 Here comes the directory listing.

drwxr-xr-x 2 1009 1009 6 May 08 08:54 file1_new

-rw-r–r-- 1 0 0 0 May 07 03:25 noshare4

-rw-r–r-- 1 0 0 0 May 07 03:25 noshare5

-rw-r–r-- 1 1009 1009 0 May 08 08:57 test4

-rw-r–r-- 1 1009 1009 0 May 08 08:57 test5

-rw-r–r-- 1 1009 1009 0 May 08 08:57 test6

drwxr-xr-x 2 1009 1009 6 May 08 03:09 新建文件夹

226 Directory send OK.

ftp> get noshare4 noshare5 # 下载多个文件

local: noshare5 remote: noshare4

227 Entering Passive Mode (192,168,59,129,188,214).

150 Opening BINARY mode data connection for noshare4 (0 bytes).

226 Transfer complete.

ftp> !ls # 已经被下载

file1 file2 file3 noshare4 noshare5 pub test4 test5 test6

ftp>

ftp> modtime test4 #查看文件最后修改时间

test4 05/08/2021 08:57:25 GMT

ftp> 221 Goodbye.

linux浏览器使用【不推荐】


linux在什么地方打开浏览器不用我说了吧? 【没有图形化的,老老实实用上面命令方式】

在这里插入图片描述

打开浏览器

  • 方式1

点击应用程序-Firefox

在这里插入图片描述

  • 方式2

打开终端,输入:firefox & 就会自动弹出浏览器了

在这里插入图片描述

浏览器中访问ftp

  • 在地址栏输入:ftp://ip 回车即可弹出输入用户名和密码界面【服务端需要先配置完毕】

在这里插入图片描述

  • 我下面输入配置好的用户名和密码【下面yb2是配置的虚拟用户】

在这里插入图片描述

  • 登陆进来以后就是这样子了

在这里插入图片描述

  • 直接点击文件可以在线访问

保存:对着文件点击右键-Save Link As...

自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。

深知大多数Linux运维工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则几千的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!

因此收集整理了一份《2024年Linux运维全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。
img
img
img
img
img

既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上Linux运维知识点,真正体系化!

由于文件比较大,这里只是将部分目录大纲截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且后续会持续更新

如果你觉得这些内容对你有帮助,可以添加VX:vip1024b (备注Linux运维获取)
img

最全的Linux教程,Linux从入门到精通

======================

  1. linux从入门到精通(第2版)

  2. Linux系统移植

  3. Linux驱动开发入门与实战

  4. LINUX 系统移植 第2版

  5. Linux开源网络全栈详解 从DPDK到OpenFlow

华为18级工程师呕心沥血撰写3000页Linux学习笔记教程

第一份《Linux从入门到精通》466页

====================

内容简介

====

本书是获得了很多读者好评的Linux经典畅销书**《Linux从入门到精通》的第2版**。本书第1版出版后曾经多次印刷,并被51CTO读书频道评为“最受读者喜爱的原创IT技术图书奖”。本书第﹖版以最新的Ubuntu 12.04为版本,循序渐进地向读者介绍了Linux 的基础应用、系统管理、网络应用、娱乐和办公、程序开发、服务器配置、系统安全等。本书附带1张光盘,内容为本书配套多媒体教学视频。另外,本书还为读者提供了大量的Linux学习资料和Ubuntu安装镜像文件,供读者免费下载。

华为18级工程师呕心沥血撰写3000页Linux学习笔记教程

本书适合广大Linux初中级用户、开源软件爱好者和大专院校的学生阅读,同时也非常适合准备从事Linux平台开发的各类人员。

需要《Linux入门到精通》、《linux系统移植》、《Linux驱动开发入门实战》、《Linux开源网络全栈》电子书籍及教程的工程师朋友们劳烦您转发+评论

一个人可以走的很快,但一群人才能走的更远。如果你从事以下工作或对以下感兴趣,欢迎戳这里加入程序员的圈子,让我们一起学习成长!

AI人工智能、Android移动开发、AIGC大模型、C C#、Go语言、Java、Linux运维、云计算、MySQL、PMP、网络安全、Python爬虫、UE5、UI设计、Unity3D、Web前端开发、产品经理、车载开发、大数据、鸿蒙、计算机网络、嵌入式物联网、软件测试、数据结构与算法、音视频开发、Flutter、IOS开发、PHP开发、.NET、安卓逆向、云计算

本书还为读者提供了大量的Linux学习资料和Ubuntu安装镜像文件,供读者免费下载。

华为18级工程师呕心沥血撰写3000页Linux学习笔记教程

本书适合广大Linux初中级用户、开源软件爱好者和大专院校的学生阅读,同时也非常适合准备从事Linux平台开发的各类人员。

需要《Linux入门到精通》、《linux系统移植》、《Linux驱动开发入门实战》、《Linux开源网络全栈》电子书籍及教程的工程师朋友们劳烦您转发+评论

一个人可以走的很快,但一群人才能走的更远。如果你从事以下工作或对以下感兴趣,欢迎戳这里加入程序员的圈子,让我们一起学习成长!

AI人工智能、Android移动开发、AIGC大模型、C C#、Go语言、Java、Linux运维、云计算、MySQL、PMP、网络安全、Python爬虫、UE5、UI设计、Unity3D、Web前端开发、产品经理、车载开发、大数据、鸿蒙、计算机网络、嵌入式物联网、软件测试、数据结构与算法、音视频开发、Flutter、IOS开发、PHP开发、.NET、安卓逆向、云计算

  • 26
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值