linux中FTP命令行下载文件

本文介绍了在Linux环境中如何使用FTP命令行工具下载文件,包括两个关键命令的使用方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

命令1:

[root@123 admin]# wget ftp://admin:admin@目标IP:端口//路径/文件名
--2020-07-29 11:14:33--  ftp://admin:admin@目标IP:端口/路径/文件名
           => ‘文件名’
Connecting to 目标IP:端口... connected.
Logging in as admin ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) 路径 ... done.
==> SIZE 文件名 ... 79131
==> PASV ... done.    ==> RETR 文件名 ... done.
Length: 79131 (77K) (unauthoritative)

100%[=====================================================================================================================>] 79,131       328KB/s   in 0.2s   

2020-07-29 11:14:34 (328 KB/s) - ‘文件名’ saved [79131]

命令2:

[root@123 admin]# ftp 目标IP:端口
Connected to 目标IP (目标IP).
220 (vsFTPd 2.2.2)
Name (目标IP:root): admin
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 (目标IP:端口,60,221)
150 Here comes the directory listing.
...
具体文件和文件目录
...
ftp> lcd /opt/wacos/
Local directory now /opt/wacos
ftp> get 文件名
local: 文件名 remote: 文件名
227 Entering Passive Mode (目标IP,92,223)
150 Opening BINARY mode data connection for 文件名 (79131 bytes).
226 Transfer complete.
79131 bytes received in 0.205 secs (385.18 Kbytes/sec)
ftp> quit
221 Goodbye.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值