CWD – change working directory 更改目录
DELE – delete a remote file 删除文件
LIST – list remote files 列目录
MKD – make a remote directory 新建文件夹
NLST – name list of remote directory
PWD – print working directory 显示当前工作目录
RETR – retrieve a remote file 下载文件
RMD – remove a remote directory 删除目录
RNFR – rename from 重命名
RNTO – rename to 重命名
STOR – store a file on the remote host 上传文件
ABOR – abort a file transfer 取消文件传输
CWD – change working directory 更改目录
DELE – delete a remote file 删除文件
LIST – list remote files 列目录
MDTM – return the modification time of a file 返回文件的更新时间
MKD – make a remote directory 新建文件夹
NLST – name list of remote directory
PASS – send password
PASV – enter passive mode
PORT – open a data port 打开一个传输端口
PWD – print working directory 显示当前工作目录
QUIT – terminate the connection 退出
RETR – retrieve a remote file 下载文件
RMD – remove a remote directory
RNFR – rename from # RNTO – rename to
SITE – site-specific commands
SIZE – return the size of a file 返回文件大小
STOR – store a file on the remote host 上传文件
TYPE – set transfer type 设置传输类型
USER – send username 发送用户名
公司几台windows2003的服务器,都是企业版,打开系统自带的防火墙,客户反映ftp上来经常会卡住。
解决办法是把ftp设置为被动模式并且指定端口
两种方法,我用第一种实现了,因为做安全的时候把wshom.ocx跟shell32.dll都拿掉了
wget -nH -m –ftp-user=user –ftp-password=passwd ftp://ipaddress/*
-nH不建立以IP为名的文件夹, -m是mirror镜像
FTP脚本上传个文件,如果目标机器已经有,就提示已经存在,并且显示文件大小,
如果没有这个文件就上传,很久没有摆弄php,顺手写了一个
linux下用过scp、rsync,还真没用过直接命令行ftp传东西…