一、登录FTP服务器
格式:ftp [hostname| ip-address]
a)在linux命令行下输入ftp 10.15.221.75
b)服务器询问你用户名和密码,分别输入用户名和相应密码,待认证通过即可。
如下:
[root@localhost]# ftp 10.15.221.75
Connected to 10.15.221.75 (10.15.221.75).
220 (vsFTPd 2.2.2)
Name (10.15.221.75:root): eric_lte
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
二、文件上传和下载
1、文件上传
(1)put
格式:put local-file [remote-file]
(2)mput
格式:mput local-files
2、文件下载
(1)get
格式:get [remote-file] [local-file]
(2)mget
格式:mget [remote-files]
三、其它
bye:退出
prompt off 关闭交互提示信息
在Linux下FTP常用的命令如下:
ftp> ?
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
ftp>