SUMMARY: Automatic FTP using .netrc

From: Rayane Abdel-Samad (
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 login user password passwd --- 2. Create another file containing:

script --- #! /bin/sh

ftp <<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 {Consulting Poster Child}) Tawanda Queen <>

Also Thanks to: Dieter Gobbers <> Jim Harmon <> Brion Leary <> anil sikri <> Joel Lee <> and Glenn Satchell - Uniq Professional Services <>

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

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