Discussion Locked

unix to unix copy

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

hello sir,
i want to copy some files from my remote server to local server . i have ftp and telnet access.
i want to write a perl or shell script for that. through that script i want to open an ftp connections. then i can easily copy that files.
so pls mail some info. reagrding dynamic ftp connection.
pragneshkumar gandhi

9 replies

by spepper

#!/bin/sh
#script to run on local server, ftps file
#from remote server to local server
#requires .netrc file on local server
SOURCE="remoteServerName"
FILE="fileToGet"
#alternatively get file or list of files #from the command line
ftp $SOURCE <

by nickread

unix to unix copy (uucp) is a dying tool. No one really uses it anymore. You could use rcp, rlogin, etc but I don't suggest that either.

Try out rsync. It is a secure form of telnet, and has advanced copying facilities. It is very easy to useand only downloads the CHANGES of a file, not the whole file, which saves lots of time.

If it is not already installed, look at...
http://rsync.samba.org/

by jpereira

Answer no. 1 is nearly right
The ftp command should have a -i switch (turns off interactive)
and the first two lines following the ftp should be a user name and a password respectively.

by fparacchini

You can use wget instead of ftp.
It has a lot of functionalities for copying directory structures and can be included in a shell script or in a crontab with minimum effort.

This discussion is closed to new replies.