免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2759 | 回复: 3
打印 上一主题 下一主题

求助!!ftp自动上传脚本问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-02-01 15:34 |只看该作者 |倒序浏览
脚本内容
#!/bin/bash
a=access20070128.log.gz
ftp -inv <<!!
open 192.168.5.33
user logs logs
binary
prompt off
cd 123
put $a $a
put access20070127.log.gz access20070127.log.gz
quit
!!

[root@localhost 123]# . ftp.cron
.onnected to 192.168.5.3
220 Serv-U FTP Server v6.2 for WinSock ready...
500 'AUTH': command not understood.
500 'AUTH': command not understood.
KERBEROS_V4 rejected as an authentication type
Remote system type is UNIX.
Using binary mode to transfer files.
331 User name okay, need password.
230 User logged in, proceed.
?Invalid command
Interactive mode on.
250 Directory changed to /g:/123
remote: access20070130.log.gz
: No such file or directoryz
local: access20070127.log.gz remote: access20070127.log.gz
227 Entering Passive Mode (192,168,5,3,7,63)
150 Opening BINARY mode data connection for access20070127.log.gz.
226 Transfer complete.
733 bytes sent in 0.00094 seconds (7.6e+02 Kbytes/s)
?Invalid command
221 Goodbye!
: command not found
我想知道问题在脚本里还是在ftp上,put 文件必须在ftp端有一个对应名吗?

论坛徽章:
0
2 [报告]
发表于 2007-02-09 11:16 |只看该作者
怎么没人回答呀!!

论坛徽章:
0
3 [报告]
发表于 2007-02-09 12:30 |只看该作者
它不是提示你找不到档案了

你 put $a $a 没成功
put put access20070127.log.gz access20070127.log.gz
有成功呀.
检查一下 $a 的档案是否存在.

而且我看你脚本是定义 a 为 access20070128.log.gz
讯息中怎么会出现 access20070130.log.gz

ps: 楼下的, 我也是这样想a 是依 date 取值的 ,
      不过楼主说他的脚本是他贴出来的那样的话, 应该是定值才对呀.

[ 本帖最后由 vantien 于 2007-2-9 13:11 编辑 ]

论坛徽章:
0
4 [报告]
发表于 2007-02-09 12:48 |只看该作者
初步判断根据当前时间获取的文件,例如30号应该上传ACCESS20070130的文件,但本地没有该文件吧
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP