cron to check ftp upload/download

ajay chaudhary ajay197947 at rediffmail.com
Mon Mar 21 12:15:50 UTC 2005


  
thanks very much i will work on this and ask if any query

rgds

ajay

On Sat, 19 Mar 2005 Rick Stevens wrote :
>karlp at ourldsfamily.com wrote:
>>>can u tell me a little sort of script line that i will put in.
>>>
>>>wget ftp://tivimtech.com/*.* .......rest i do not know
>>>how will i specify user name and password ? and will *.* download all file
>>>of ftp server in any folder?
>>
>>
>>Frankly, I'd use ftp to do it and run a script like this one I wrote
>>(you'll have to change the PUT to GET and any associated syntax):
>>
>>#!/bin/sh
>>if [ "$6" = '' ] &&
>>    [ "$5" = '' ] &&
>>    [ "$4" = '' ] &&
>>    [ "$3" = '' ] &&
>>    [ "$2" = '' ] &&
>>    [ "$1" = '' ]
>>  then
>>    echo
>>    echo Usage: $0 DestHost USERNm PASSWd LocalPth2Dir RemotePth2Dir FNAME
>>    echo
>>    exit 1
>>fi
>>HOST=$1
>>USERNM=$2
>>PASSWD=$3
>>LPATH=$4
>>RPATH=$5
>>FNAME=$6
>>ftp -p -n $HOST 2>/dev/null  <<- End_of_FTP_commands
>>user $USERNM $PASSWD
>>lcd $LPATH
>>cd $RPATH
>>put $FNAME
>>End_of_FTP_commands
>
>Uh, how about:
>
>#!/bin/bash
>if [ $# -lt 6 ]; then
>     echo
>     echo Usage: $0 remotehost username passwd localpath remotepath fname
>     echo
>     exit 1
>fi
>ncftpget -d /var/log/ncftpget.log -u $2 -p $3 $1 $4 $5/$6
>
>----------------------------------------------------------------------
>- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
>- VitalStream, Inc.                       http://www.vitalstream.com -
>-                                                                    -
>-   The light at the end of the tunnel is really an oncoming train.  -
>----------------------------------------------------------------------
>
>_______________________________________________
>Redhat-install-list mailing list
>Redhat-install-list at redhat.com
>https://www.redhat.com/mailman/listinfo/redhat-install-list
>To Unsubscribe Go To ABOVE URL or send a message to:
>redhat-install-list-request at redhat.com
>Subject: unsubscribe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/redhat-install-list/attachments/20050321/72a0647f/attachment.htm>


More information about the Redhat-install-list mailing list