Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ftp logs?

Status
Not open for further replies.

cleansedbb

Technical User
Feb 11, 2002
95
US
how would i get a script to ftp logs from one server to another.

i.e.

ftp site.com
user blah
pass blah2
cd /dialy/logs
mput access*
exit

I want to make this a script so I can have cron do this for me daily so I dont have to.

Thanks
 
Like this - you need the prompt command to stop the mput command asking you about each file it finds.

ftp -inv <<END_FTP
open site.com
user blah
pass blah2
cd /dialy/logs
prompt
mput access*
END_FTP

There are actually two FAQ's on the subject - but they're not very clear to be honest. Mike
&quot;Experience is the comb that Nature gives us after we are bald.&quot;

Is that a haiku?
I never could get the hang
of writing those things.
 
thank you it works except for one part. it hangs
up on the password

I get Connect to site.com (IP)
remote system type UNIX
331: user ok need password
Password:

 
try:

ftp -inv <<END_FTP
open site.com
user blah blah2
cd /dialy/logs
prompt
mput access*
END_FTP
Mike
&quot;Experience is the comb that Nature gives us after we are bald.&quot;

Is that a haiku?
I never could get the hang
of writing those things.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top