ftp如何上传与下载文件01
ftp>ls
ftp> lcd /tmp
Local directory now /tmp
ftp> get anaconda.log
local: anaconda.log remote: anaconda.log
227 Entering Passive..192,168,1,16,4,0).
150 File status okay; about to open data connection.
226 file sent ok
返回到本机目录
ftp>cd /tools #返回本地
550 Ŀ¼������.............. /tools #成功
ftp>ls #查看一下
ftp> put yum.log #把这个yum.log的文件传到本地
local: yum.log remote: yum.log
227 Entering Passive..192,168,1,16,4,0).
150 File status okay; about to open data connection.
226 file sent ok #成功
#如果目录文件太多,比如 tmp下的文件太多,想传出来
ftp> mput *.*
mput anaconda.log?
227 Entering Passive..192,168,1,16,4,0).
150 File status okay; about to open data connection.
226 file sent ok #成功
mput ifcfg.log? y
227 Entering Passive..192,168,1,16,4,0).
150 File status okay; about to open data connection.
226 file sent ok #成功
mput packaging.log? y
227 Entering Passive..192,168,1,16,4,0).
150 File status okay; about to open data connection.
226 file sent ok #成功
mput pconlinefds.zip? y
227 Entering Passive..192,168,1,16,4,0).
150 File status okay; about to open data connection.
226 file sent ok #成功
1406076 bytes sent in 0.0449 secs (31328.98 Kbytes/sec)
mput program.log? y
227 Entering Passive..192,168,1,16,4,0).
150 File status okay; about to open data connection.
226 file sent ok #成功
#如果不想每次都输入y,太麻烦了,有第三种方法
ftp> ? #输入一个?找到 promp
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> prompt off #关闭以后输入再也不用点y了
Interactive mode off.
ftp> mput *.*