您的位置:首页 > 编程语言 > PHP开发

Ftp put 上传文件

2013-08-16 10:02 148 查看
废话不说了,有需要的请参考
]# ftp 10.187.94.28
Connected to 10.187.94.28 (10.187.94.28).
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 2 of 50 allowed.
220-Local time is now 09:35. Server port: 21.
220-This is a private system - No anonymous login
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 10 minutes of inactivity.
Name (10.187.94.28:root): 《-- 输入用户名
331 User ichibanc OK. Password required
Password:《--输入密码
230 OK. Current restricted directory is /
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd public_html/ 《——进入目标目录
250 OK. Current directory is /public_html
ftp> passive 《——关闭被动模式
Passive mode off.
ftp> put 2.tar.gz ./2.product.tar.gz 《——使用put 上传文件,其中: 2.tar.gz 为本地文件,./2.product.tar.gz 为上传的目标目录及文件名

local: 2.tar.gz remote: ./2.product.tar.gz
200 PORT command successful
150 Connecting to port 58254
226-File successfully transferred
226 12.823 seconds (measured here), 29.43 Mbytes per second
395667801 bytes sent in 12.8 secs (30870.52 Kbytes/sec)
ftp> 《——上传完成

ftp> bye
221-Goodbye. You uploaded 386395 and downloaded 0 kbytes.
221 Logout.

注意:上传目标目录 要有写权限

参考 http://www.cnblogs.com/buro79xxd/archive/2010/01/22/1682590.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: