automate ftp

automate ftp

Post by Clinton Lich » Tue, 18 Jul 2000 04:00:00



hi..

i would like to automate an ftp transfer .
i have set up my .netrc file and can log in automaticaly .
but i would like to create a script to kick off the ftp automatically
and get files from a remote server..
i will use cron or at to kick it off , but how can i get unix to
automatically get the files

thanks in advance

 
 
 

automate ftp

Post by danverd » Tue, 18 Jul 2000 04:00:00


I had to do this and used an expect script. It works really well.

man expect


> hi..

> i would like to automate an ftp transfer .
> i have set up my .netrc file and can log in automaticaly .
> but i would like to create a script to kick off the ftp automatically
> and get files from a remote server..
> i will use cron or at to kick it off , but how can i get unix to
> automatically get the files

> thanks in advance


 
 
 

automate ftp

Post by mike schec » Tue, 18 Jul 2000 04:00:00


I just use a simple shell script to do this.  You can get a little more
complex and use variable for the put of get as needed.

ftp -n  << EOF
open 192.168.1.2
user myuser mypasswd
get /etc/hosts
quit
EOF

 
 
 

automate ftp

Post by n.. » Tue, 18 Jul 2000 04:00:00


Hi Clinton,

create a file in your home dir called .netrc... add the following or what you want:

 machine server.to.connect.to.co.uk
 login username
 password password
 macdef init
 prompt
 binary
 lcd ~/local/dir
 mget the/file/you-watn*.tar.gz
 quit

However, probably not the best way to do this.  Is the other machine
owned by you?  Are you worried about security?

Above should help anyway.

John


> hi..
> i would like to automate an ftp transfer .
> i have set up my .netrc file and can log in automaticaly .
> but i would like to create a script to kick off the ftp automatically
> and get files from a remote server..
> i will use cron or at to kick it off , but how can i get unix to
> automatically get the files
> thanks in advance

 
 
 

automate ftp

Post by Chad Smal » Tue, 18 Jul 2000 04:00:00


Please don't.  ftp commands are easily automated in a shell script as has
been shown up* times in this newsgroup.
You can call a script like this one below from the command-line, or cron,
passing it any or all of the variables to meet your requirements.  Expect,
however, does work well for automating telnet sessions...

-------
#!/bin/ksh
ftp -in $servername <<-!
user $user $password
bin
put/get $file
bye
!
-------


> I had to do this and used an expect script. It works really well.

> man expect


> > hi..

> > i would like to automate an ftp transfer .
> > i have set up my .netrc file and can log in automaticaly .
> > but i would like to create a script to kick off the ftp automatically
> > and get files from a remote server..
> > i will use cron or at to kick it off , but how can i get unix to
> > automatically get the files

> > thanks in advance

 
 
 

automate ftp

Post by Dmitry Krivitsk » Tue, 18 Jul 2000 04:00:00


Install a GNU program called wget.


Quote:>hi..

>i would like to automate an ftp transfer .
>i have set up my .netrc file and can log in automaticaly .
>but i would like to create a script to kick off the ftp automatically
>and get files from a remote server..
>i will use cron or at to kick it off , but how can i get unix to
>automatically get the files

>thanks in advance

 
 
 

1. Automated ftp file transfer

Would anyone  know of a way to have an automated  script to  connected
to a local ip and download a group of files ?
I need to plug my laptop in every day which is running linus 3.0
slackware and down load the files to my other system also running
Linux..

Any help would be great thanks !


2. Graphic FTP client

3. automate ftp?

4. SquidGuard and seeing my http server

5. Automating FTP sessions in Linux...?....?

6. Problems mapping VME memory on Sparc 5V board

7. Automating FTP transfers over terminal - looking for ideas

8. FX ripples dialog box

9. automated ftp from script

10. Automated FTP commands

11. Automated FTP Transfers (cron)

12. automate FTP session

13. automated ftp via C++