Date: Thu, 28 Jan 2010 20:10:21 +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: <20100128201021.40b0e44c.freebsd@edvax.de> In-Reply-To: <9A8CAB63B4C2014B883AF16FDFB362FB01F016C7@xpo.staff.copa> References: <9A8CAB63B4C2014B883AF16FDFB362FB01F016C5@xpo.staff.copa> <20100128090254.7452a557.freebsd@edvax.de> <9A8CAB63B4C2014B883AF16FDFB362FB01F016C7@xpo.staff.copa>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 28 Jan 2010 10:21:32 -0800, "Dixit, Viraj" <Viraj.Dixit@CityofPaloAlto.org> wrote: > Thanks so much. One question, I created a .netrc file and put it in the > root (/root) directory and this is what it looks like below. I have > taken out the IP, user name & password so no body can use them. Do you regularly work as root? :-) > Can you > tell me if my syntax is correct [...] Check "man ftp", there's a whole section "THE .netrc FILE". I know that the ability to rely on manpage information isn't very common in Linux land due to missing documentation quality. :-) > [...] and how do I activate this file and is > this file in the right place on the server. The syntax is "ftp -N <file>". The default is ~/-netrc. > machine 172.16.0.38 > login > password > macdef init > binary > lcd /ftp > cd /var/temp > get newemp.db > quit That looks okay to me. You can process it with "ftp -v" to check verbose output for any strange things, should they ever happen. In order to avoid interaction (especially when working with more than one file), you could add "prompt" to supress any manual input. By the way, FreeBSD's ftp program accepts stdin input, such as printf "prompt\nmdelete *\nbye\n" | \ ftp ftp://$(FTPUSER):$(FTPPASSWD)@$(SERVER)/ This is what I call "make deinstall" for web pages. :-) This means that you could do the same as with .netrc. -- 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?20100128201021.40b0e44c.freebsd>