SUMMARY: Automatic FTP using .netrc

From: Rayane Abdel-Samad (rayane@inco.com.lb)
Date: Thu Dec 04 1997 - 06:54:50 CST


Hi all,

Original message:

---
I am on a Sun Sparc server 20 with solaris 2.4 installed. I have been
using automatic FTP with .netrc for quite some time now. What I am
facing, is when the amount of files to be transferred is large, i get
the following output from the FTP redirection: "4K macro buffer
exceeded", and the FTP stops without doing anything.
---

The pb is that when .netrc exceed 4K bytes, automatic FTP does not work. Breaking down .netrc into smaller parts does the job.

A better solution is this:

1. Create the .netrc with only the following line:

.netrc --- machine xxx.xxx.xxx.xxx login user password passwd --- 2. Create another file containing:

script --- #! /bin/sh

ftp xxx.xxx.xxx.xxx <<EOF 2>&1 prompt off binary

#FTP commands go here bye EOF

---

3. Run the script and ... ta da !!!

Primary Advantage: you are not limited to one .netrc and one FTP session to the same host machine. If you want to open many automatic FTP sessions to the same host machine, this is the ultimate solution.

Thanks to the much appreciated help of: (Couldn't have done it without your help) Kevin.Sheehan@uniq.com.au (Kevin Sheehan {Consulting Poster Child}) Tawanda Queen <trq96@acs.org>

Also Thanks to: Dieter Gobbers <gobbers@faw.uni-ulm.de> Jim Harmon <jim@telecnnct.com> Brion Leary <brion@dia.state.ma.us> anil sikri <asikri@rocketmail.com> Joel Lee <jlee@thomas.com> and Glenn Satchell - Uniq Professional Services <Glenn.Satchell@uniq.com.au>

-- Rayane Abdel-Samad Computer & Communications Engineer, ME --



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:11 CDT