Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Sua <ausrius@theophys.kth.se>
Subject: Re: ftp automatic login
Date: 1999/08/25	[thread overview]
Message-ID: <37C3B3B7.F7777B6A@theophys.kth.se> (raw)
In-Reply-To: 37C24ABD.93623EA6@poczta.wp.pl

Hej.

acturro wrote:
> 
> does someone know how to send files selected i.e. by command find via
> ftp using automatic login information $HOME/.netrc? (as parameter list
> for command mput)
> 
> If pipe is on and the first character of the file name is the vertical
> bar (|) the remainder of the argument is interpreted as shell command.
> ftp then forks a shell.
> But it does not work.

Well, try this (you can write all this stuff on one line,
if you remove comments):

echo "machine <remote> login <yourname> password <yourpasswd> macdef init" >
.netrc;
echo "prompt" >> .netrc; # probably not needed
find . -name "whatever" -exec echo "put" {} >> .netrc \; ;
echo "bye" >> .netrc;
echo >> .netrc;
ftp;
rm -f .netrc # just in case (the file will be world readable, probably)

Change <remote> into your.remote.machine.name, <yourname> into your remote
login,
<yourpasswd> into your remote passwd, and <. -name "whatever"> into whatever you
use for your find command.

I'd install ssh and use scp in your case, however.

Regards,
Sua



      reply	other threads:[~1999-08-25  4:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-24  4:00 ftp automatic login acturro
1999-08-25  4:00 ` Sua [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox