2
1
I typically use the bash command line when I need to FTP something. I have found that certain FTP servers are not set to binary mode by default and unless I remember to do so, the file sent will be corrupt. Is there a way to set binary mode automatically every time I access a remote ftp server?
Why not issue 'bin' each time you do an upload? – t0mm13b – 2009-12-13T19:17:50.250
Very good question! I have just strace'ed the ftp command. I see that ftp reads .netrc, but unfortunately netrc supports only username/passwd AFAIK. – None – 2009-12-13T19:32:36.923
Steven - if someone answers this question with an expect script, would you then have to migrate that answer back to SO? – galaxywatcher – 2009-12-13T19:44:16.640