
pub在linux
下
/var/ftp/pub
改配置文件/etc/vsftpd.conf这个配置文件.
定位到一下两行配置
#Local_enble=yes
#Write_enable=no
更改成如下配置即可
Local_enble=yes
Write_enable=yes
通过windows cmd窗口命令C:\Documents and Settings\Administrator>d:
D:\>e:
step1:ftp登录
E:\>ftp 128.8.28.212
Connected to 128.8.28.212.
220 (vsFTPd 2.2.2)
User (128.8.28.212:(none)): oracle
331 Please specify the password.
Password:
230 Login successful.
step2:查看目录中的文件列表
ftp>cd wangxj
250 Directory successfully changed.
ftp>ls
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
enfo_ods.dmp
enfo_ods.log
tsubject.dmp
tsubject.log
226 Directory send OK.
ftp: 收到 56 字节,用时 0.00Seconds 56000.00Kbytes
step3:从linux当前目录下载文
ftp>get enfo_ods.dmp200 PORT command successful. Consider using PASV150 Opening BINARY mode data connection for enfo_ods.dmp (325029888 bytes)226 Transfer complete.ftp: 收到 325029888 字节,用时 27.39Seconds 11866.74Kbytes/sec.
ftp>get enfo_ods.log
200 PORT command successful. Consider using PASV.
150 Opening BINARY mode data connection for enfo_ods.log (13704 bytes).
226 Transfer complete.
ftp: 收到 13704 字节,用时 0.00Seconds 13704000.00Kbytes/sec.
step4:从windows上传文件到linux
ftp>put test.ktr
test.ktr: File not found
//退出ftp 或者用bye
ftp>quit
E:\>ftp 128.8.28.212
Connected to 128.8.28.212.
220 (vsFTPd 2.2.2)
User (128.8.28.212:(none)): oracle
331 Please specify the password.
Password:
230 Login successful.
ftp>put E:\test.ktr
200 PORT command successful. Consider using PASV.
150 Ok to send data.
226 Transfer complete.
ftp: 发送 23410 字节,用时 0.00Seconds 23410000.00Kbytes/sec.
ftp>
备注:
ftp是通用协议,不区分系统的。
知道linux机器的IP即可。开始 ->运行,输入cmd并回车,键入以下命令(前面的>为命令提示符,不用输入):>ftp Linux机器的IP地址>binary>put windows系统本地文件全路径 /linux系统上的目标路径>bye 其中,如果是文本文件,可以不用binary设置为二进制传输模式(默认文本模式,会自动转换文本格式)。如果是非文本文件(例如可执行文件),建议一定要设置为 binary 模式。
建议楼主系统学习下Linux的ftp服务搭建等知识点。《Linux就该这么学》这本书很不错,里面有很系统、很全面的图文介绍!
希望可以帮到您!
首先,你要在linux上安装ftp的服务,端口号是21,可以通过ps aux |grep ftp来查看是否有运行的进程来确定ftp服务是否正常启动,或者通过查看端口号netstat –apn | grep 21 来判断ftp是否正常启动然后,你要关闭防火墙的21端口,确保外面用能ftp软件(flushFTP等)能连接到linux主机
最后在ftp客户端软件数据liunux服务器ip,用户名和密码,确定连接成功就能上传啦
黑马程序员的PHP是国内最早开设的真正人工智能课程。课程全面系统,紧跟时代潮流。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)