Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 May 2001 19:02:20 -0700
From:      "Doug Wilson" <want_2_learn_freebsd@hotmail.com>
To:        <freebsd-questions@FreeBSD.ORG>
Subject:   FTP shell script
Message-ID:  <DAV32ur825nVEL8ZwKL000035c3@hotmail.com>

next in thread | raw e-mail | index | archive | help
Hi,

I need to have a scrip zip up a directory periodically, and ftp it to a
microsoft version ftp server.  The zip part was a snap.  But I can't seem to
get anywhere with the ftp part.

1st, here is the last script I tried:

#! /bin/csh

zip -r /home/wwwroot/mrtg-backup.zip /home/wwwroot/vhosts/mrtg.apc.net/*
ftp ftp://myusername:mypassword@ftp.apc.net
put mrtg-backup.zip
by

OK, now clearly, this is wrong as 1) the following line are never passed to
the ftp server, but what has really been frosting me is 2) a problem with
passive transfers.

The ftp server I'm ftping to doesn't allow passive transfers (goes REAL
SLOW--really useless when trying to do passive), but when I execute that
script, it automatically enables passive transfers for the session.  I have
searched and searched for a .netrc, but found none to turn that off.

I know that at the command line, I can type passive, then it will disable
passive mode, but only for that session, and not in my script.  Since
passive is default, I tried passing the -p in the initial ftp line, but that
only requested it!

Anyone got any ideas?

Thanks!

Doug.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DAV32ur825nVEL8ZwKL000035c3>