*BSD News Article 69228


Return to BSD News archive

#! rnews 1679 bsd
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.cs.su.oz.au!inferno.mpx.com.au!news.unimelb.EDU.AU!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!news.sdsmt.edu!nntp.uac.net!news.tufts.edu!blanket.mitre.org!news.mathworks.com!news.kei.com!newsfeed.internetmci.com!in2.uu.net!EU.net!sun4nl!beta.nedernet.nl!usenet
From: Gary Howland <gary@systemics.com>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: FTP Script
Date: Thu, 23 May 1996 15:50:30 +0200
Organization: Systemics Ltd.
Lines: 29
Message-ID: <31A46D26.3D0D0DF2@systemics.com>
References: <31a339af.19094706@news.hq.af.mil>
NNTP-Posting-Host: mainstreet.support.nl
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.0b2 (X11; I; FreeBSD 2.1.0-RELEASE i386)
X-Forwarded: by - (DeleGate2.8.31)

Scott Gregory wrote:
> 
> What is the best (an easiest) way to create a FTP script???
> 
> I'm trying to download multiple directories from another UNIX (SCO)
> box weekly and would like to set this up automatically with crontab,
> but I don't have any idea how (or where to look) to create a script.
> 
> A co-worker created a test script, but as soon as it logs in it doen't
> go back to the script to find out what it is supposed to do.


Use ncftp, eg:

        echo "cd pub\n put x.tar" | ncftp site.com

and ensure that your .ncftprc looks like:

        machine site.com
                user me
                password secret


(of course this assumes you're running unix)

Gary
--
pub  1024/C001D00D 1996/01/22  Gary Howland <gary@systemics.com>
Key fingerprint =  0C FB 60 61 4D 3B 24 7D  1C 89 1D BE 1F EE 09 06