Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: "Bill Thompson" <parker@nospam.en.com>
Subject: Re: Automatic downloading by using cron ?
Date: 1998/12/29	[thread overview]
Message-ID: <h32i2.1379$u47.41913426@news.en.com> (raw)
In-Reply-To: 36805353.CD334257@990.net


qhuo wrote in message <36805353.CD334257@990.net>...
>
>
>MK wrote:
>>
>> On Wed, 16 Dec 1998 16:41:58 +0100, Nguyen-Dai Quy
>> <DaiQuy.nguyen@ulg.ac.be> wrote:
>>
>> >Hi,
>> >Howto download a file via ftp (anonymous) automatically by using
>> >crontab ?
>> >I try in my cron file:
>> >0 2 25 12 * /home/users/quy/mydownload
>> >
>> >With my script "mydownload". Which command I can put in my script
>> >for automatic downloading ?
>>
>> man wget
>> man lftp
>> man pavuk
>>
>> and lots of other packages
>>
>
>ftp can be used to do it.
>
>First create a file ~/.netrc contains a line like this:
>default anonymous guest@
>
>Then create a command file ftp_commands like this:
>open ftp_site_address
>cd /dir/to/the/file
>lcd /local/dir/to/put/the/file
>bin (or asc)
>get name_of_the_file
>bye
>
>Now, issue the command:
>ftp < ftp_commands
>
>To do it via crontab, just put last command in "mydownload".

That will work, but it can be done without a ~/.netrc file:

Create a command file: ftp_commands:

open ftp_site_address
user user_name password
cd /dir/to/the/file
lcd /local/dir/to/put/the/file
bin (or asc)
get name_of_the_file (or mget wildcard_specification)
bye

Now issue the command:
ftp -n <ftp_commands





      reply	other threads:[~1998-12-29  5:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-16  5:00 Automatic downloading by using cron ? Nguyen-Dai Quy
1998-12-16  5:00 ` J. S. Jensen
1998-12-16  5:00 ` Timothy J. Lee
1998-12-17  5:00   ` William Roeder
1998-12-16  5:00 ` Mario Stargard
1998-12-17  5:00 ` Urban Roth
1998-12-17  5:00 ` Matt Bumgardner
1998-12-17  5:00   ` Mike Bristow
1998-12-17  5:00 ` Nikola Milutinovic
1998-12-17  5:00 ` Giant Wang
1998-12-17  5:00   ` Mike Di Fulvio
1998-12-17  5:00     ` Jens Kristian S�gaard
1998-12-20  5:00 ` MK
1998-12-23  5:00   ` qhuo
1998-12-29  5:00     ` Bill Thompson [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox