According to Shawn Craver: While burning my CPU.
> 
> I have a Red Hat 5.2 system up and running and want to schedule it to
> download StarOffice overnight and then shutdown.  I've already compiled a
> new kernel with APM support and I know how to use cron to schedule it to
> dial up to my ISP and then to close the connection and shutdown when it's
> done.  My question is how to set up a script that would open the ftp
> connection, and continue at the point where the download last left off (I
> generally use ncftp, but have other progs too).  

#!/bin/sh

ti=`date`
downloaddir="/home/ftp/pub/linux/staroffice"

cd $downloaddir

if [ $# -ne 2 ]; then
 echo "ftp script: invalid options, aborted at $ti | mail root@localhost
 exit
fi

# make sure were in the correct directory.

ftp -in <<-!

        open $1
        user ftp -Shawn
        cd $2
        binary
        reget staroffice
!

Run the script as ./name pipo.com <full path to the DIRECTORY where the file
is located>
For example its in /pub/linux/staroffice and the ftp server is pipo.com do;

./script_name pipo.com /pub/linux/staroffice

Make sure you edit the script to reflect to the directopry where the file is
located on YOUR machine.


> 
>       --Shawn Craver
>         University Of Connecticut
>         Computer Science and Engineering
>         Undergraduate Student
> 


-- 
Regards Richard.
[EMAIL PROTECTED]

Reply via email to