Automatic file transfer through a script
between machines using FTP.
If one wants to transfer files between
UNIX machines, here are the steps to follow.
1. The .netrc file
a. create .netrc in the home directory.
b. add this line
machine login password
e.g.
machine abc.mydomain.com login deepak password deep123
c. chmod 600 .netrc
2. The Script:
ftp abc.mydomain.com << endl
prompt
put test1.c
quit
endl
This should do it.
This tip generously supported by: dkotian1@rediffmail.com NOTE: All tips provided are USE AT YOUR OWN RISK. Tips are submitted
by various unix admins around the globe. UGU suggest you read and
test each tip in a non-volitile environment before placing into
production.