Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Oct 1996 17:45:21 +0800 (HKT)
From:      John Beukema <john@gateway.net.hk>
To:        xiyuan qian <xiyuan@npc.haplink.co.cn>
Cc:        isp@freebsd.org, steve@cioe.com
Subject:   Re: Need help on auto ftp a file to a PC station from my FreeBSD2.1.0
Message-ID:  <Pine.BSI.3.91.961022173537.1194D-100000@gateway.net.hk>
In-Reply-To: <199610221107.LAA14201@npc.haplink.co.cn>

next in thread | previous in thread | raw e-mail | index | archive | help

On Tue, 22 Oct 1996, xiyuan qian wrote:

> Hi, I am planning auto ftp a file to a PC station, so I can handle the file. But I really need some help, that is:
> 1). How to ftp a file to a PC with Win31 installed. Someone told me to install a ftpd on the PC, will it be OK?
> 2). How can it be auto? I mean I need put one file to the PC automaticly. I can auto login, auto passwd, auto put the file or get the file. 
> 3). Can someone help me with auto ftp between two FreeBSD2.1 box?

Here is one set up to do it.

.netrc  #must be readable by owner only

#get mail from ISP by ftp
machine is1.hk.super.net
login jbeukema password xxxxxxxx
# 
#macro init runs automatically after login
macdef init
cd /var/spool/mail
get jbeukema johnmail
delete jbeukema
quit
#alternate anomyonous ftp
login ftp jbeukema@hk.super.net

getmail  # this shell initiates the ftp call

#!/bin/sh
#pickup mail from hk.super.net
cd ~john
ftp is1.hk.super.net > /dev/null
if [ -e johnmail ] 
then
cat johnmail >> /var/mail/john
rm johnmail
echo "You have new mail (:-)"
else
echo "No mail (:-("
fi

man ftp

Hope this helps.
jbeukema

> 
> Best regaurds!
> 
> --xiyuan
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSI.3.91.961022173537.1194D-100000>