Date: Fri, 29 Jan 2010 11:46:55 +0100 From: Polytropon <freebsd@edvax.de> To: "Dixit, Viraj" <Viraj.Dixit@CityofPaloAlto.org> Cc: freebsd-questions@freebsd.org Subject: Re: Is their Automatic command to send a JPG file using FTP Message-ID: <20100129114655.31700ac8.freebsd@edvax.de> In-Reply-To: <9A8CAB63B4C2014B883AF16FDFB362FB01F016CD@xpo.staff.copa> References: <9A8CAB63B4C2014B883AF16FDFB362FB01F016C5@xpo.staff.copa> <20100127225334.GX50360@dan.emsphone.com> <9A8CAB63B4C2014B883AF16FDFB362FB01F016CD@xpo.staff.copa>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 28 Jan 2010 13:39:38 -0800, "Dixit, Viraj" <Viraj.Dixit@CityofPaloAlto.org> wrote: > Hi, > > 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 > binary > lcd /ftp > cd /var/temp > get newemp.db > quit Looks valid to me, but you could do this more easily, at least for testing: % cd /var/temp % ftp VJ:123456@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. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100129114655.31700ac8.freebsd>