Linux ftp 命令

来源:互联网 发布:网络实用技术基础作业2 编辑:程序博客网 时间:2024/05/24 04:45
[deepen@vd26wyjl01 ~]$ ftp IP地址
Connected to 10.xxxx.191 (10.xxxx191).
220-FileZilla Server 0.9.53 beta
220-written by Tim Kosse (tim.kosse@filezilla-project.org)
220 Please visit https://filezilla-project.org/
Name (10.xxxx.191:deepen): yzcloud
331 Password required for yzcloud
Password:
230 Logged on

Remote system type is UNIX.


--遍历文件

ftp> ls
227 Entering Passive Mode (xxxxxxx)
150 Opening data channel for directory listing of "/"
-rw-r--r-- 1 ftp ftp        7404450 May 25  2017 0525.zip
-rw-r--r-- 1 ftp ftp        7521933 Jun 02  2017 0602.zip

-rw-r--r-- 1 ftp ftp       15738963 Jun 05  2017 0605.zip


  1. ftp> binary  // 设置传输方式为binary  


在下载一个文件之前,我们首先需要使用lcd命令设定本地接受目录位置。

ftp> lcd /data/dt3/


ftp> get volte.zip


使用 put命令上传文件:

put  file
当文件不再当前本地目录下的时候,可以使用绝对路径:

put /path/file
同样,可以上传多个文件:

mput *.xls
 

关闭 FTP 连接


完成FTP工作后,为了安全起见需要关闭连接。有三个命令可以关闭连接:

bye
exit
quit