From owner-freebsd-questions Mon Nov 2 15:17:23 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA23915 for freebsd-questions-outgoing; Mon, 2 Nov 1998 15:17:23 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from mail.HiWAAY.net (fly.HiWAAY.net [208.147.154.56]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA23910 for ; Mon, 2 Nov 1998 15:17:21 -0800 (PST) (envelope-from dkelly@n4hhe.ampr.org) Received: from nospam.hiwaay.net (tnt1-17.HiWAAY.net [208.147.147.17]) by mail.HiWAAY.net (8.9.0/8.9.0) with ESMTP id RAA09962; Mon, 2 Nov 1998 17:15:40 -0600 (CST) Received: from n4hhe.ampr.org (localhost.ampr.org [127.0.0.1]) by nospam.hiwaay.net (8.8.8/8.8.8) with ESMTP id PAA10894; Mon, 2 Nov 1998 15:15:24 -0600 (CST) (envelope-from dkelly@n4hhe.ampr.org) Message-Id: <199811022115.PAA10894@nospam.hiwaay.net> X-Mailer: exmh version 2.0.2 2/24/98 To: Steven P Yang cc: freebsd-questions@FreeBSD.ORG From: David Kelly Subject: Re: how do I automate ftp? (clarification) In-reply-to: Message from Steven P Yang of "Mon, 02 Nov 1998 14:17:21 EST." <199811021917.OAA13614@scrubbing-bubbles.mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 02 Nov 1998 15:15:24 -0600 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Steven P Yang writes: > Hi, about my last e-mail, a specific goal I have in mind for an automated ftp > would be the ability to schedule a file transfer at a specific time to > a remote ftp server. So, this implies that the ftp script would automatically > supply the username and password. > I can do this on NT, but don't know if I can do this on FreeBSD. > > Is this possible? Not only possible, but falling-out-of-bed simple. See the man page for fetch(1). Basically "fetch ftp://user:password@host/file" will get you there from here. Fetch will also download web pages. That opens up all kinds of interesting things, such as download and archive of current stock prices, comic strips, etc. Also /usr/ports/net/ncftp3 could be used. The "advantage" of ncftp3 is that you can create a file of user names and passwords for ncftp3 to use automatically on a per site basis. The disadvantage is this file exists with passwords in the clear for somebody to dig for. Fetch may leave your password on the command line, visible with ps to other users on your host. ncftp3 should allow you to put files too. Once Upon A Time I would run nasty ftp jobs in batch. Type all your commands into a file then, "ftp < filename". A rotten way to do things if something hiccups. /usr/ports/lang/expect looks like it can provide the tools needed to be able to add error handling. -- David Kelly N4HHE, dkelly@nospam.hiwaay.net ===================================================================== The human mind ordinarily operates at only ten percent of its capacity -- the rest is overhead for the operating system. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message