LoveUnix » 编程开发 & Rational » 求教根据文件列表FTP的SHELL(急)
让LU留住您的每

一天 让LU博客留住您的每一天
2006-8-31 14:33 wlmoon
求教根据文件列表FTP的SHELL(急)

菜鸟求教

我在一个unix服务器上有一个文件夹例:test 里面有一些文件
另有一个清单文件 例如 test.log
要写一个shell根据test.log上的清单来FTP test文件夹里的指定文件到另一个unix服务器

谢谢各位高手拉!!!!!

2006-9-1 14:19 wlmoon
居然没有人来!!!!

cat oladb.log | while read line
do
ftp -n <<!
open IP
user user passwd
bin
cd /test/test/test
put $line
cd ..
!
done

自己解决了一半。。苦恼的是UNIX下FTP不能带路径,因为要PUT的文件不是在一个目录下。内容类似为:
/test1/test1.dmp
/test2/test3/test2.dmp
.
.
.
而UNIX下
FTP>put /test1/test1.dmp 是不可行的。谁能指点一下。
要PUT的文件总量很大。100G左右,所以先复制再FTP的方法暂时不考虑

页: [1]


Powered by Discuz! Archiver 5.5.0  © 2001-2006 Comsenz Inc.