Is their Automatic command to send a JPG file using FTP
freebsd at edvax.de
Fri Jan 29 10:46:57 UTC 2010
On Thu, 28 Jan 2010 13:39:38 -0800, "Dixit, Viraj" <Viraj.Dixit at CityofPaloAlto.org> wrote:
> The script that I have setup does not work if I run the .netrc file. I
> ran the commands in ftp -v mode and it did not like machine command, did
> not like passwd or pwd etc.
Did you issue the command
% ftp -v 0.0.0.0
(where 0.0.0.0 refers to the "machine" identifier in .netrc)?
> machine 0.0.0.0
> login VJ
> password 123456
> macdef init
> lcd /ftp
> cd /var/temp
> get newemp.db
Looks valid to me, but you could do this more easily, at least
% cd /var/temp
% ftp VJ:123456 at 0.0.0.0/ftp/newemp.db
This should get you the file into the correct directory.
> If I use this command in .netrc it connects to the server but it does
> not connect using my login name VJ, it points to some other name.
> ftp 0.0.0.0 <ftp://ftp 0.0.0.0/>
That's not the correct way to call the ftp program.
> .netrc simply doesn't work in FreeBSD.
For sure it does, as described in the manpage.
> Is their someone who has a working script. Thanks!!!
See my example above.
At the moment, it doesn't seem that you "send" a file per
FTP, but "receive" one. This can also be achieved through
the .netrc file, but to make sure everything works ON BOTH
SIDES of the connection, try the ftp command given above
where the needed information is "hardcoded". You can add
the -v parameter, too.
If you require more help, describe more exactly what you're
intending to do.
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions