From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f72b0,6085b126b0df2ddd X-Google-Attributes: gidf72b0,public X-Google-Thread: fc89c,6085b126b0df2ddd X-Google-Attributes: gidfc89c,public X-Google-Thread: 1012a6,6085b126b0df2ddd X-Google-Attributes: gid1012a6,public X-Google-Thread: fee84,6085b126b0df2ddd X-Google-Attributes: gidfee84,public X-Google-Thread: 1020c6,6085b126b0df2ddd X-Google-Attributes: gid1020c6,public From: "Bill Thompson" Subject: Re: Automatic downloading by using cron ? Date: 1998/12/29 Message-ID: #1/1 X-Deja-AN: 426727764 References: <3677D4C6.2FC1B5FC@ulg.ac.be> <367aa6ac.3912891@news.tpnet.pl> <36805353.CD334257@990.net> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 X-Trace: news.en.com 914926925 207.180.193.108 (Tue, 29 Dec 1998 05:22:05 EDT) NNTP-Posting-Date: Tue, 29 Dec 1998 05:22:05 EDT Newsgroups: comp.unix.admin,comp.unix.shell,comp.unix.osf.osf1,comp.unix.misc,comp.unix.programmer qhuo wrote in message <36805353.CD334257@990.net>... > > >MK wrote: >> >> On Wed, 16 Dec 1998 16:41:58 +0100, Nguyen-Dai Quy >> 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