[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Is it possible to "script" and FTP session???



[Charset iso-8859-1 unsupported, filtering to ASCII...]
> A friend of mine asked if I could set up his Linux box to automatically FTP
> some files from a specific directory every time he connects to the Internet.
> He is using 'ifup ppp0' to connect.  I had done something similar to this
> for myself but using E-mail.  Is there any way to get FTP or 'ncftp' to
> automatically log in to an ftp site, change to a local directory and then
> transfer files upon connection?  I looked at the man pages for 'ftp' and it
> looked like the macdef command would do this to a certain extent.  Am I on
> the right track?

I used the following script to download files in background (nohup)

#!/bin/sh

{ 
     echo "bin" ;
     echo "prompt" ;
     echo "cd <the directory>/" ;
     echo "get <the file>" ;
     echo "bye";
} | ftp <the server>



> 
> Thanks,
> G. Lenzer
> 
> 
> 
> 
> -- 
>   PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
> 		http://www.redhat.com http://archive.redhat.com
>          To unsubscribe: mail redhat-list-request redhat com with 
>                        "unsubscribe" as the Subject.
> 
> 


-- 
-----------------------------------------------
system failure ... hit any user to continue ...
-----------------------------------------------
Nico De Ranter
Sony Service Center (PSDC-B/DNSE-B)
Sint Stevens Woluwestraat 55 (Rue de Woluwe-Saint-Etienne)
1130 Brussel (Bruxelles), Belgium, Europe, Earth
Telephone: +32 2 724 86 41 Telefax: +32 2 726 26 86
e-mail: nico deranter sonycom com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]