1、安装ftp
[root@10.90.3.118 ~]# yum install ftp -y
2、连接FTP服务器
[root@10.90.3.118 ~]# ftp 10.10.242.99
Connected to 10.10.242.99 (10.10.242.99).
220-FileZilla Server 0.9.60 beta
220-written by Tim Kosse (tim.kosse@filezilla-project.org)
220 Please visit https://filezilla-project.org/
Name (10.10.242.99:root): dzq
331 Password required for dzq
Password:
230 Logged on
Remote system type is UNIX.
3、展示
ftp> ls
227 Entering Passive Mode (10,10,242,99,246,177)
150 Opening data channel for directory listing of "/"
-r--r--r-- 1 ftp ftp 4685831 Apr 03 14:36 H3CloudOS-E1502H01D058-Frontend.tar.gz
-r--r--r-- 1 ftp ftp 58141567 Apr 03 14:38 H3CloudOS-E1502H01D075-Backend.tar.gz
-r--r--r-- 1 ftp ftp 58141085 Apr 04 10:40 H3CloudOS-E1502H01D077-Backend.tar.gz
4、接受文件
ftp> get H3CloudOS-E1502H01D075-Backend.tar.gz /root/dzq/H3CloudOS-E1502H01D075-Backend.tar.gz
local: /root/dzq/H3CloudOS-E1502H01D075-Backend.tar.gz remote: H3CloudOS-E1502H01D075-Backend.tar.gz
227 Entering Passive Mode (10,10,242,99,207,188)
150 Opening data channel for file download from server of "/H3CloudOS-E1502H01D075-Backend.tar.gz"
WARNING! 221459 bare linefeeds received in ASCII mode
File may not have transferred correctly.
226 Successfully transferred "/H3CloudOS-E1502H01D075-Backend.tar.gz"
58141567 bytes received in 7.2 secs (8070.66 Kbytes/sec)
5、发送文件
ftp> put /root/Example.groovy Example.groovy
local: /root/Example.groovy remote: Example.groovy
227 Entering Passive Mode (10,10,242,99,193,36)
150 Opening data channel for file upload to server of "/Example.groovy"
226 Successfully transferred "/Example.groovy"
395 bytes sent in 0.00869 secs (45.44 Kbytes/sec)